File tree 6 files changed +62
-3
lines changed
6 files changed +62
-3
lines changed Original file line number Diff line number Diff line change 3
3
/node_modules /
4
4
/vendor /
5
5
/build /
6
+ /dist /
6
7
/.vagrant /
7
8
/console.log
8
9
/phpcs.xml
Original file line number Diff line number Diff line change @@ -20,11 +20,13 @@ jobs:
20
20
env :
21
21
WORDPRESS_IMAGE_VERSION : php7.2
22
22
23
+ - name : Test Release Bundle
24
+ script : npm run release
25
+
23
26
- stage : deploy
24
27
name : Tag Release
25
28
if : tag IS present
26
- before_deploy :
27
- - npm run release
29
+ script : npm run release
28
30
deploy :
29
31
provider : releases
30
32
api_key :
34
36
file :
35
37
- stream.zip
36
38
- stream-$TRAVIS_TAG.zip
39
+ on :
40
+ all_branches : true
41
+ repo : xwp/stream
42
+
43
+ - name : Tag Package
44
+ if : branch IS present AND type = push
45
+ script : npm run release
46
+ before_deploy :
47
+ - openssl aes-256-cbc -K $encrypted_49634e5b1863_key -iv $encrypted_49634e5b1863_iv -in ./local/travis/travis_deploy_key.enc -out ~/.ssh/id_rsa -d
48
+ - chmod 600 ~/.ssh/id_rsa
49
+ deploy :
50
+ provider : script
51
+ script : ./local/scripts/dist.sh
52
+ skip_cleanup : true
53
+ on :
54
+ all_branches : true
55
+ repo : xwp/stream
37
56
38
57
services :
39
58
- docker
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ module.exports = function( grunt ) {
65
65
'languages/*' ,
66
66
'readme.txt' ,
67
67
'readme.md' ,
68
+ 'composer.json' ,
68
69
'contributing.md' ,
69
70
] ,
70
71
dest : 'build' ,
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Set this to -ex for verbose output.
4
+ set -ex
5
+
6
+ ROOT_DIR=" $( git rev-parse --show-toplevel) "
7
+ WORKING_BRANCH=" $( git rev-parse --abbrev-ref HEAD) "
8
+ COMMIT_MESSAGE=" $( git log -1 --oneline) "
9
+ SRC_DIR=" $ROOT_DIR /build"
10
+
11
+ DIST_REPO=
" [email protected] :xwp/stream-dist.git"
12
+ DIST_DIR=" $ROOT_DIR /dist"
13
+ DIST_BRANCH=" ${TRAVIS_BRANCH:- $WORKING_BRANCH } "
14
+ DIST_TAG=" ${1:- $TRAVIS_TAG } "
15
+
16
+ export GIT_DIR=" $DIST_DIR /.git"
17
+ export GIT_WORK_TREE=" $DIST_DIR "
18
+
19
+ # Start with a clean slate.
20
+ rm -rf " $DIST_DIR "
21
+
22
+ git clone --progress --verbose " $DIST_REPO " " $DIST_DIR /.git"
23
+ git checkout -B " $DIST_BRANCH "
24
+
25
+ # Use the release bundle as the work tree.
26
+ export GIT_WORK_TREE=" $SRC_DIR "
27
+
28
+ # Commit the latest changes.
29
+ git add --all
30
+ git commit --allow-empty --message " $COMMIT_MESSAGE "
31
+
32
+ # And maybe tag a release.
33
+ if [ -n " $DIST_TAG " ]; then
34
+ echo " Tagging a release: $DIST_TAG "
35
+ git tag --force " $DIST_TAG "
36
+ fi
37
+
38
+ git push --force --set-upstream origin " $DIST_BRANCH " --tags
Original file line number Diff line number Diff line change 37
37
},
38
38
"scripts" : {
39
39
"postinstall" : " composer install && npm run build" ,
40
- "build" : " grunt default " ,
40
+ "build" : " grunt build " ,
41
41
"release" : " grunt release" ,
42
42
"deploy" : " grunt deploy" ,
43
43
"lint-js" : " eslint ." ,
You can’t perform that action at this time.
0 commit comments