Add open api bump version in release script
authorChocobozzz <me@florianbigard.com>
Thu, 22 Nov 2018 14:04:14 +0000 (15:04 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 22 Nov 2018 14:04:14 +0000 (15:04 +0100)
package.json
scripts/openapi-peertube-version.sh
scripts/release.sh
support/doc/api/openapi.yaml

index 7342cddb54e0cd2387a0e057e8259ff181cdf41c..8d39222311d28808134d5ac2afed720f9eab0986 100644 (file)
@@ -70,7 +70,7 @@
   },
   "husky": {
     "hooks": {
-      "pre-commit": "./scripts/openapi-peertube-version.sh && lint-staged"
+      "pre-commit": "lint-staged"
     }
   },
   "lint-staged": {
index c638291f6a08dd12a7ecf1ad4a338df19bfb8e8e..4eb481e6435b277f47feb89722edd00d6aac9aaa 100755 (executable)
@@ -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
index ccb93bc44c500abfbbe27b040be2b83c03a3ac14..134f2d288d52bb217326d1d0ee6ae479690ffda0 100755 (executable)
@@ -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
index f0c0b46b188de5f26ad0bbfce937a95edcbf6bee..3a3e71f93dad343484cd9da81ebb5bf4ffa3703c 100644 (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'