diff options
author | Chocobozzz <me@florianbigard.com> | 2018-11-22 15:04:14 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-11-22 15:04:14 +0100 |
commit | 6cc98dfff3d021c0c75e618e251fc99706459bf2 (patch) | |
tree | c8cfcef2e48f765053259f5d5ee02c948d9ead73 | |
parent | 326b44070b32210f12f53e52288047cb7652a13d (diff) | |
download | PeerTube-6cc98dfff3d021c0c75e618e251fc99706459bf2.tar.gz PeerTube-6cc98dfff3d021c0c75e618e251fc99706459bf2.tar.zst PeerTube-6cc98dfff3d021c0c75e618e251fc99706459bf2.zip |
Add open api bump version in release script
-rw-r--r-- | package.json | 2 | ||||
-rwxr-xr-x | scripts/openapi-peertube-version.sh | 4 | ||||
-rwxr-xr-x | scripts/release.sh | 4 | ||||
-rw-r--r-- | support/doc/api/openapi.yaml | 2 |
4 files changed, 8 insertions, 4 deletions
diff --git a/package.json b/package.json index 7342cddb5..8d3922231 100644 --- a/package.json +++ b/package.json | |||
@@ -70,7 +70,7 @@ | |||
70 | }, | 70 | }, |
71 | "husky": { | 71 | "husky": { |
72 | "hooks": { | 72 | "hooks": { |
73 | "pre-commit": "./scripts/openapi-peertube-version.sh && lint-staged" | 73 | "pre-commit": "lint-staged" |
74 | } | 74 | } |
75 | }, | 75 | }, |
76 | "lint-staged": { | 76 | "lint-staged": { |
diff --git a/scripts/openapi-peertube-version.sh b/scripts/openapi-peertube-version.sh index c638291f6..4eb481e64 100755 --- a/scripts/openapi-peertube-version.sh +++ b/scripts/openapi-peertube-version.sh | |||
@@ -1,4 +1,6 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
1 | # Version key/value should be on his own line | 3 | # Version key/value should be on his own line |
2 | PACKAGE_VERSION=$(node -p "require('./package.json').version") | 4 | PACKAGE_VERSION=$(node -p "require('./package.json').version") |
3 | 5 | ||
4 | sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" support/doc/api/openapi.yaml | 6 | sed -i "s/\(^\s*\)version: .*/\1version: $PACKAGE_VERSION/" ./support/doc/api/openapi.yaml |
diff --git a/scripts/release.sh b/scripts/release.sh index ccb93bc44..134f2d288 100755 --- a/scripts/release.sh +++ b/scripts/release.sh | |||
@@ -60,7 +60,9 @@ fi | |||
60 | 60 | ||
61 | npm version -f --no-git-tag-version --no-commit-hooks "$1" | 61 | npm version -f --no-git-tag-version --no-commit-hooks "$1" |
62 | 62 | ||
63 | git commit package.json client/package.json -m "Bumped to version $version" | 63 | ./scripts/openapi-peertube-version.sh |
64 | |||
65 | git commit package.json client/package.json ./support/doc/api/openapi.yaml -m "Bumped to version $version" | ||
64 | git tag -s -a "$version" -m "$version" | 66 | git tag -s -a "$version" -m "$version" |
65 | 67 | ||
66 | npm run build | 68 | npm run build |
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index f0c0b46b1..3a3e71f93 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -1,7 +1,7 @@ | |||
1 | openapi: 3.0.0 | 1 | openapi: 3.0.0 |
2 | info: | 2 | info: |
3 | title: PeerTube | 3 | title: PeerTube |
4 | version: 1.1.0-alpha.2 | 4 | version: 1.1.0-rc.1 |
5 | contact: | 5 | contact: |
6 | name: PeerTube Community | 6 | name: PeerTube Community |
7 | url: 'https://joinpeertube.org' | 7 | url: 'https://joinpeertube.org' |