From 1d859b5afa88583dc27027fe14d0aa13e24a44a3 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 13 Nov 2018 14:31:31 +0100 Subject: sync API version with PeerTube version and auto-update it via git hooks --- scripts/openapi-peertube-version.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 scripts/openapi-peertube-version.sh (limited to 'scripts') 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 @@ +# Version key/value should be on his own line +PACKAGE_VERSION=$(node -p "require('./package.json').version") + +sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" support/doc/api/openapi.yaml -- cgit v1.2.3