Skip to content

Commit b58a5a4

Browse files
committed
Add release script
1 parent 065b910 commit b58a5a4

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
"deploy": "now --dotenv=.env.production --regions all",
6363
"alias": "now alias",
6464
"deploy-ci": "now --token=$NOW_TOKEN --regions all -e NODE_ENV=production -e REACT_APP_STRIPE_PUBLIC_KEY=@guide-stripe-public-key",
65-
"alias-ci": "now alias --token=$NOW_TOKEN"
65+
"alias-ci": "now alias --token=$NOW_TOKEN",
66+
"release": "scripts/release.sh"
6667
},
6768
"now": {
6869
"name": "guide",

scripts/release.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
#
3+
# usage: release.sh version
4+
5+
# args: branch, version
6+
release_branch () {
7+
git checkout $1
8+
git tag $1_$2
9+
}
10+
11+
COUNTER=0
12+
until [ $COUNTER -gt 18 ]; do
13+
release_branch $COUNTER $1
14+
let COUNTER+=1
15+
done
16+
17+
git push origin --tags

0 commit comments

Comments
 (0)