-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·37 lines (35 loc) · 998 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
set -e
git diff-index --quiet HEAD --
git checkout develop
git pull
npm test
git checkout -b release/$1
npm version --no-git-tag-version $1
npm i
npm run docs
git add docs/* package.json package-lock.json
git commit --no-verify -m "release version $1"
git checkout master
git pull
git merge --no-ff --no-verify -m "merge release/$1 into master" release/$1
npm run changelog
git add CHANGELOG.md
npm run docs
git add docs/index.html
git commit --amend --no-verify -m "merge release/$1 into master"
git tag v$1
git push --no-verify
git push origin --no-verify v$1
git checkout develop
git merge --no-ff --no-verify -m "merge release/$1 into develop" release/$1
git diff develop master -- CHANGELOG.md > patchfile
git apply patchfile
rm patchfile
git diff develop master -- docs/index.html > patchfile
git apply patchfile
rm patchfile
git add CHANGELOG.md docs/index.html
git commit --amend --no-verify -m "merge release/$1 into develop"
git push --no-verify
git branch -D release/$1