ActivityPub-federated video streaming platform using P2P directly in your web browser
sync API version with PeerTube version and auto-update it via git hooks
Rigel Kent1d859b5afa88
diff --git a/package.json b/package.jsonindex bc514920de..3c77b93cbf 100644--- a/package.json+++ b/package.json@@ -71,7 +71,7 @@},"husky": {"hooks": {- "pre-commit": "lint-staged"+ "pre-commit": "lint-staged && ./scripts/openapi-peertube-version.sh"}},"lint-staged": {diff --git a/scripts/openapi-peertube-version.sh b/scripts/openapi-peertube-version.shnew file mode 100755index 0000000000..c638291f6a--- /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.yamldiff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yamlindex 59ca8b29a9..f3520a7b17 100644--- a/support/doc/api/openapi.yaml+++ b/support/doc/api/openapi.yaml@@ -1,7 +1,7 @@swagger: '2.0'info:title: PeerTube- version: 1.0.0-beta+ version: 1.1.0-alpha.2description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.host: peertube.example.comsecurityDefinitions: