1
0
Fork 0

Add open api bump version in release script

This commit is contained in:
Chocobozzz 2018-11-22 15:04:14 +01:00
parent 326b44070b
commit 6cc98dfff3
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 8 additions and 4 deletions

View File

@ -70,7 +70,7 @@
},
"husky": {
"hooks": {
"pre-commit": "./scripts/openapi-peertube-version.sh && lint-staged"
"pre-commit": "lint-staged"
}
},
"lint-staged": {

View File

@ -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

View File

@ -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

View File

@ -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'