-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrelease.sh
executable file
·37 lines (30 loc) · 933 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/bash
if git diff-index --quiet HEAD --; then
# Checkout develop
git checkout develop 1> /dev/null
git pull 1> /dev/null
echo "Checked out develop branch"
# Run interactive release
npm run create-release
echo "New tag and release created"
# Merge develop into master
git checkout master 1> /dev/null
git pull origin master 1> /dev/null
git merge develop 1> /dev/null
git push origin master 1> /dev/null
echo "Merged develop into master"
# Pull from master into develop
git checkout develop 1> /dev/null
git pull origin master 1> /dev/null
git push origin develop 1> /dev/null
echo "DEVELOP branch now has latest changes from master"
echo
echo "Current git status:"
echo
git status
echo
echo "** Release completed **"
echo
else
printf "ERROR Working dir must be clean.\nPlease stage and commit your changes.\n\n";
fi