sync API version with PeerTube version and auto-update it via git hooks
This commit is contained in:
parent
408f50ebc7
commit
1d859b5afa
|
@ -71,7 +71,7 @@
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "lint-staged"
|
"pre-commit": "lint-staged && ./scripts/openapi-peertube-version.sh"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
|
|
@ -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.yaml
|
|
@ -1,7 +1,7 @@
|
||||||
swagger: '2.0'
|
swagger: '2.0'
|
||||||
info:
|
info:
|
||||||
title: PeerTube
|
title: PeerTube
|
||||||
version: 1.0.0-beta
|
version: 1.1.0-alpha.2
|
||||||
description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
|
description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
|
||||||
host: peertube.example.com
|
host: peertube.example.com
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
|
|
Loading…
Reference in New Issue