From 6cc98dfff3d021c0c75e618e251fc99706459bf2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 22 Nov 2018 15:04:14 +0100 Subject: [PATCH] Add open api bump version in release script --- package.json | 2 +- scripts/openapi-peertube-version.sh | 4 +++- scripts/release.sh | 4 +++- 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 @@ }, "husky": { "hooks": { - "pre-commit": "./scripts/openapi-peertube-version.sh && lint-staged" + "pre-commit": "lint-staged" } }, "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 @@ +#!/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 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 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 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 @@ 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' -- 2.25.1