diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-11-13 14:31:31 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2018-11-13 14:31:48 +0100 |
commit | 1d859b5afa88583dc27027fe14d0aa13e24a44a3 (patch) | |
tree | 02acab355c64c9debf2c17606b363035a76f23ec /scripts/openapi-peertube-version.sh | |
parent | 408f50ebc7cc3c0887d1e77a5c04508517dc151e (diff) | |
download | PeerTube-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-x | scripts/openapi-peertube-version.sh | 4 |
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 | ||
2 | PACKAGE_VERSION=$(node -p "require('./package.json').version") | ||
3 | |||
4 | sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" support/doc/api/openapi.yaml | ||