forked from gantry/gantry5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
135 lines (131 loc) · 8.2 KB
/
.travis.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
language: php
php: 5.6
branches:
except:
- master
- /^feature\//
notifications:
email:
on_success: never
on_failure: always
webhooks:
urls:
- https://webhooks.gitter.im/e/4205227638a80c69f2e0
on_success: always
on_failure: always
on_start: never
slack:
secure: cHbnVNoDkoOMPCs1lzD4u3NA0ALfQMtXQdkntADSCqgleHHuRS1SmSGU2o7lj1HkOLGNDEyIHmpeQMaZBvvVG1iq3qVHWROnIx9lV2uuXPRDB7xlFSZ71pxr2GRG2fzO5DVIye+sMsyie2A5RCQ6NHaCzO6B3Q0pss0pza3TZ8sYXbezkGoEI4NLXPKCZaQboZAA8uPsiAPg1G4KGazDYkXQ2jg5lk9Uokf51OehzbkpAYfn2f8A+ZxJ8T48LrFC8sLxl+cDWRRdRneX32WCzksoSlOhsbRsLkf8IZVWxLlX9QC1QMg8JIe6/tU98fPMZBF3ZWuSNuLVOHpMAr+/fXxqwBW7bss+vYR/bW5L7oRSyJx5tMAwR5BOcSvIUCXOs4Tq00JMELbn7oL/cesie6L3SJcuxtXPggOdRrhMfX5ehRvFETp+mAbIDtr19+JRhTkjLpMIXx7y2IrJijtCxqAavhJ2iMGzpDp343tRCTNYml/yOB23VnyWSI/43Y87pqIa93GfddbcTidSbnTO6bdiSoIRumiFYdmpX/plmH/jdOxjBeDo6uKc2+KoJgdgr7HIGdOQRdQdqoOMF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kY0LbhCdgbePIDwEbfXPpwOf+rGOS/zMfuc="
before_install:
- nvm install stable
- nvm use stable
- composer self-update
- npm config set spin false
- npm install -g yarn
- if [ ! -z "$TRAVIS_TAG" ]; then
gem install sass;
yarn global add gulp;
fi
install:
- if [ ! -z "$TRAVIS_TAG" ]; then
yarn;
gulp -up;
fi
- cd $TRAVIS_BUILD_DIR/src/platforms/joomla && composer install --no-dev;
- cd $TRAVIS_BUILD_DIR/src/platforms/wordpress && composer install --no-dev;
- cd $TRAVIS_BUILD_DIR/src/platforms/grav && composer install --no-dev;
- cd $TRAVIS_BUILD_DIR/src/platforms/prime && composer install --no-dev;
- cd $TRAVIS_BUILD_DIR/bin/build && composer install --no-dev
script:
- export SHORT_COMMIT=$(echo $TRAVIS_COMMIT | cut -c1-9)
- echo "Branch ($TRAVIS_BRANCH)"
- cd $TRAVIS_BUILD_DIR/bin/build
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
php build.php dev -Dpackage_dir=$TRAVIS_BUILD_DIR/../repo_pkgs -Dxml.version=dev-$SHORT_COMMIT -Dstr.fileversion=_develop;
elif [ ! -z "$TRAVIS_TAG" ]; then
php build.php prod -Dpackage_dir=$TRAVIS_BUILD_DIR/../repo_pkgs -Dxml.version=$TRAVIS_TAG;
else
echo "($TRAVIS_BRANCH) is not a supported branch for builds";
fi
before_deploy:
- export PROJ_PKGS_PATH=$TRAVIS_BUILD_DIR/../repo_pkgs
- export PROJ_PKGS=$HOME/build/$TRAVIS_REPO_SLUG/../repo_pkgs/*.zip
- if [ "$TRAVIS_BRANCH" == 'develop' ]; then
FILES_PATH=$PROJ_PKGS_PATH;
JSON="{";
FILES=$FILES_PATH/*.zip;
COUNT=`ls $FILES 2>/dev/null | wc -l | awk '{print $1}'`;
COMMIT=$TRAVIS_COMMIT;
SHORT_COMMIT=$(echo $COMMIT | cut -c1-9)
CURRENT_DATE=`date +%s`
JSON+="\"count\":$COUNT,";
JSON+="\"commit\":\"$COMMIT\",";
JSON+="\"commit_short\":\"$SHORT_COMMIT\",";
JSON+="\"date\":\"$CURRENT_DATE\",";
JSON+="\"files\":[";
i=0;
for file in ${FILES[@]}; do
i=$(($i + 1));
SIZE=`wc -c < $file | awk '{print $1}'`;
DATE=`stat --format=\"%m\" $file`;
JSON+="{";
JSON+="\"file\":\"${file##*/}\",";
JSON+="\"size\":$SIZE,";
JSON+="\"date\":$DATE";
JSON+="}";
if [ $i != $COUNT ]; then
JSON+=",";
fi
done;
JSON+="]}";
echo $JSON > "$FILES_PATH/map.json";
fi
deploy:
- provider: releases
api_key:
secure: "KgEZx0dHoPLOYj9T087flZKgaf4ggasJcd/DOjHjsXKhjyLYuWZNLOdJaT0MQ+UJ2RwzW+7ESR1lquwEqUN8uPFaA05SZwrCyJU1pOgTYqunM+Sz+lRWANMjgwtGNAQvPfTTAoaKZxrOVSMxv0U2OBAHE2lEsDvz7kwCuHbsoU3/xY144ecUG2lWItHjxQr2X7GmApBgCZ63OPaHK/NP1a8xtkQT+kTfKRHIZwPCyRplSRhqaa8ftQoi5SynaHtECi9/RYCRp3wgclbCPHRH3Eez4li+AdE8Q/X+LK/jmIYqOUWvq8IpS0ePg67fuE4cBNLYBrbPWgSPfUka3/61KyGRTw+2ofdf9eMOtJQa7JZUSWWUEeeyeBFIomNvY40nWSmC+T/l5EixIwBFF7CzVatnDPCz3w4gPYxAVwQjTtKqqFu6ZfeQNp0asj9OqukF3nJbN42iuIh6vxHxIQ6U3WMo+0t507i0rYf3Esl3YGlMVUuN7mNlWNv5eKrfD2CLHeBiDvo6SRCdYpgLu6FMBnwM2Fadlm51nAN/tpSxXEA1gUoVT3rJ8e6vnFcdy1ZHq1DPMtiZ8oMLBtdq8lcDs8DzKqCwImfmsDtM7M040JG/MuB5kVUXLcA5ycRCh1piDUAqITmvPucYHO8hT63cMZHwcxlqw1Ta3ckB4Ng3Eqg="
skip_cleanup: true
file_glob: true
file: "${PROJ_PKGS}"
on:
repo: gantry/gantry5
tags: true
- provider: s3
access_key_id: AKIAIGEIWVFNBMVSH2UA
secret_access_key:
secure: "DP32BDS3fk7/tLsZxj5CjiAT5GLHQFNOFte9Rds7eird+xqOSqUXHVplkOSVPKCt6V3CIO3wtxe97T4cuxtoobwVlwF8WRmrS4x98u2sLIS9lSZZzDg/W8tkLjOmW9QOKFtBEykj1z1i9nYDlhKFDtGNIkN7juZUz5UZ2S3Unwsm94vcm8ATghXGclwfib329I+7GVIA24PMUv2ETl0PGs+s+D1KmhXeU5UwharxnM+X4kyIsCBPrxXX+2QfAiSrjqKwHfzGQjRJIAQ6m4UdzuZWbxSAiJ4TrWrwRYDCKn8Va72g9UcUdiOyLd6Eg54iSCKdbQ+zELYjhcuwO7g4kpc6V/wgcHYVG4stPyuiXc2G+ZAGXDtW0H7QobeXEUTAsad2AshmCA+lFCmecywBdpsDSYp9ZBY0Qfevncmx0CIWlaPPVjUQ3FMn+oniamJlmbwpmHLiZuCyDE9sSxeQrPSI/7N+zSD03EM6AxIBswaF6XzIhcP3aPz9BzJ2v/YHpPzxtqLaLhEswxWkghmRYASaJn6Ut9xwuWkfhO2UIzkBW6RA3HV6CjZ5opQBe4IyxiVsB2qPzQfxGXz4pN2BoTbuLyf4jS0CA1h6g/7vpCz6VnOuTzBg/c7nQjk8Y69hUYHL91lSlZ/a7tNHe3z9DtaxVg24MG56e+mevYpUgLk="
bucket: gantry5
local-dir: "$PROJ_PKGS_PATH"
upload-dir: nightly
skip_cleanup: true
acl: public_read
on:
repo: gantry/gantry5
branch: develop
after_deploy:
- echo "Branch ($TRAVIS_BRANCH) - Tag ($TRAVIS_TAG)"
- if [ ! -z "$TRAVIS_TAG" ]; then
git config user.email "[email protected]";
git config user.name "Travis CI";
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*";
git fetch --quiet;
git checkout develop;
git reset --hard HEAD;
cd $TRAVIS_BUILD_DIR/bin/build;
php build.php prod-versions -Dupdate_versions=true -Dxml.version=$TRAVIS_TAG;
cd $TRAVIS_BUILD_DIR;
git commit -am "Release [$TRAVIS_TAG] - Automatic Version Number Updates";
git push --force --quiet --set-upstream https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git develop:master &>/dev/null;
curl --user ${BAMBOO_DEPLOY} -X POST -d "stage&executeAllStages&bamboo.variable.IS_RELEASE=yes&bamboo.variable.THEME_VERSION=${TRAVIS_TAG}" ${BAMBOO_SITE}THEMES-HELIUM;
fi
- if [ "$TRAVIS_BRANCH" == 'develop' ]; then
curl -L http://gantry.org/cibuilds >/dev/null 2>&1;
fi