aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/openapi-peertube-version.sh
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-11-13 14:31:31 +0100
committerRigel Kent <sendmemail@rigelk.eu>2018-11-13 14:31:48 +0100
commit1d859b5afa88583dc27027fe14d0aa13e24a44a3 (patch)
tree02acab355c64c9debf2c17606b363035a76f23ec /scripts/openapi-peertube-version.sh
parent408f50ebc7cc3c0887d1e77a5c04508517dc151e (diff)
downloadPeerTube-1d859b5afa88583dc27027fe14d0aa13e24a44a3.tar.gz
PeerTube-1d859b5afa88583dc27027fe14d0aa13e24a44a3.tar.zst
PeerTube-1d859b5afa88583dc27027fe14d0aa13e24a44a3.zip
sync API version with PeerTube version and auto-update it via git hooks
Diffstat (limited to 'scripts/openapi-peertube-version.sh')
-rwxr-xr-xscripts/openapi-peertube-version.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/openapi-peertube-version.sh b/scripts/openapi-peertube-version.sh
new file mode 100755
index 000000000..c638291f6
--- /dev/null
+++ b/scripts/openapi-peertube-version.sh
@@ -0,0 +1,4 @@
1# Version key/value should be on his own line
2PACKAGE_VERSION=$(node -p "require('./package.json').version")
3
4sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" support/doc/api/openapi.yaml