diff options
Diffstat (limited to 'scripts/openapi-peertube-version.sh')
-rwxr-xr-x | scripts/openapi-peertube-version.sh | 6 |
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 | ||
4 | PACKAGE_VERSION=$(node -p "require('./package.json').version") | ||
5 | |||
6 | sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" ./support/doc/api/openapi.yaml | ||