aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--package.json2
-rwxr-xr-xscripts/openapi-peertube-version.sh4
-rw-r--r--support/doc/api/openapi.yaml2
3 files changed, 6 insertions, 2 deletions
diff --git a/package.json b/package.json
index bc514920d..3c77b93cb 100644
--- a/package.json
+++ b/package.json
@@ -71,7 +71,7 @@
71 }, 71 },
72 "husky": { 72 "husky": {
73 "hooks": { 73 "hooks": {
74 "pre-commit": "lint-staged" 74 "pre-commit": "lint-staged && ./scripts/openapi-peertube-version.sh"
75 } 75 }
76 }, 76 },
77 "lint-staged": { 77 "lint-staged": {
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
2PACKAGE_VERSION=$(node -p "require('./package.json').version")
3
4sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" support/doc/api/openapi.yaml
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 59ca8b29a..f3520a7b1 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -1,7 +1,7 @@
1swagger: '2.0' 1swagger: '2.0'
2info: 2info:
3 title: PeerTube 3 title: PeerTube
4 version: 1.0.0-beta 4 version: 1.1.0-alpha.2
5 description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular. 5 description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
6host: peertube.example.com 6host: peertube.example.com
7securityDefinitions: 7securityDefinitions: