Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Add open api bump version in release script

Chocobozzz6cc98dfff3d0
diff --git a/package.json b/package.json
index 7342cddb54..8d39222311 100644
--- a/package.json
+++ b/package.json
@@ -70,7 +70,7 @@
},
"husky": {
"hooks": {
- "pre-commit": "./scripts/openapi-peertube-version.sh && lint-staged"
+ "pre-commit": "lint-staged"
}
},
"lint-staged": {
diff --git a/scripts/openapi-peertube-version.sh b/scripts/openapi-peertube-version.sh
index c638291f6a..4eb481e643 100755
--- a/scripts/openapi-peertube-version.sh
+++ b/scripts/openapi-peertube-version.sh
@@ -1,4 +1,6 @@
+#!/usr/bin/env bash
+
# 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
+sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" ./support/doc/api/openapi.yaml
diff --git a/scripts/release.sh b/scripts/release.sh
index ccb93bc44c..134f2d288d 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -60,7 +60,9 @@ fi
npm version -f --no-git-tag-version --no-commit-hooks "$1"
-git commit package.json client/package.json -m "Bumped to version $version"
+./scripts/openapi-peertube-version.sh
+
+git commit package.json client/package.json ./support/doc/api/openapi.yaml -m "Bumped to version $version"
git tag -s -a "$version" -m "$version"
npm run build
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index f0c0b46b18..3a3e71f93d 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: PeerTube
- version: 1.1.0-alpha.2
+ version: 1.1.0-rc.1
contact:
name: PeerTube Community
url: 'https://joinpeertube.org'