aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/openapi-peertube-version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/openapi-peertube-version.sh')
-rwxr-xr-xscripts/openapi-peertube-version.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/openapi-peertube-version.sh b/scripts/openapi-peertube-version.sh
new file mode 100755
index 000000000..4eb481e64
--- /dev/null
+++ b/scripts/openapi-peertube-version.sh
@@ -0,0 +1,6 @@
1#!/usr/bin/env bash
2
3# Version key/value should be on his own line
4PACKAGE_VERSION=$(node -p "require('./package.json').version")
5
6sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" ./support/doc/api/openapi.yaml