forked from entrylabs/entryjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
28 lines (25 loc) · 1.06 KB
/
deploy.sh
File metadata and controls
28 lines (25 loc) · 1.06 KB
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
#!/usr/bin/env bash
# set -e # 에러 발생 시 스크립트 중단
rm .gitignore
branchName="${TRAVIS_BRANCH}"
distText="dist"
deployName="${branchName/deploy/$distText}"
DATEFMT=`date "+%Y%m%d"`
# echo "$DATEFMT: My message"
cd build
git config user.name "JY KIM"
git config user.email "[email protected]"
if [ "$branchName" = "master" ]
then
git add .
git commit -m "Entry Js PUBLISH by v3.$DATEFMT.${TRAVIS_BUILD_NUMBER}"
git tag -a "v3.$DATEFMT.${TRAVIS_BUILD_NUMBER}" -m "build v3.$DATEFMT.${TRAVIS_BUILD_NUMBER}"
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" build --tags
else
git checkout -b "$deployName"
git push --delete "https://${GH_TOKEN}@${GH_REF}" "$deployName"
git add .
git commit -m "Entry Js deploy $deployName"
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" "$deployName"
fi
#curl -d '{"tag_name": "v$DATEFMT","target_commitish": "build","name": "v$DATEFMT","body": "Description of the release","draft": false,"prerelease": false}' -X POST "https://developer.github.com/v3/repos/kimokim/entryjs/releases"