forked from Nomifactory/Nomifactory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.sh
More file actions
30 lines (21 loc) · 643 Bytes
/
Copy path.travis.sh
File metadata and controls
30 lines (21 loc) · 643 Bytes
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
set -e
REGEX_SLUG="(.+)/(.+)"
[[ $TRAVIS_REPO_SLUG =~ $REGEX_SLUG ]]
REPO_NAME=${BASH_REMATCH[2]}
releaseName=""
if [ ! -z "$TRAVIS_TAG" ]
then
export TAGGED_RELEASE=true
releaseName="${REPO_NAME}-${TRAVIS_TAG}"
else
export TAGGED_RELEASE=false
shortCommit="${TRAVIS_COMMIT:0:7}"
releaseName="${REPO_NAME}-${TRAVIS_BRANCH}-${shortCommit}-snapshot"
fi
export CLIENT_ARCHIVE="${releaseName}"
export SERVER_ARCHIVE="${releaseName}-server"
gulp buildAll
mv ../build/client.zip ../build/$CLIENT_ARCHIVE.zip
mv ../build/server.zip ../build/$SERVER_ARCHIVE.zip
echo "Release = ${releaseName}"
echo "Tagged release = ${TAGGED_RELEASE}"