File tree Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ before_script:
52
52
script :
53
53
- ./scripts/ci/build-and-test.sh
54
54
55
+ after_success :
56
+ - ./scripts/ci/after-success.sh
57
+
55
58
cache :
56
59
directories :
57
60
- node_modules
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Go to the project root directory
4
+ cd $( dirname $0 ) /../..
5
+
6
+ # Download and run the Travis After All script to retrieve information about other build modes.
7
+ curl -Lo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
8
+ python travis_after_all.py
9
+
10
+ if [ " $BUILD_LEADER " = " YES" ] && [ " $BUILD_AGGREGATE_STATUS " = " others_succeeded" ]; then
11
+
12
+ echo " All other builds succeeded. Publishing build"
13
+ # ./scripts/release/publish-build-artifacts.sh
14
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Go to the project root directory
4
+ cd $( dirname $0 ) /../..
5
+
6
+ BUILD_DIR=" dist/@angular/material"
7
+ BUILD_VERSION=` sed -nE ' s/^\s*"version": "(.*?)",$/\1/p' package.json`
8
+
9
+ COMMIT_SHA=` git rev-parse --short HEAD`
10
+ COMMIT_AUTHOR=` git --no-pager show -s --format=' %an <%ae>' HEAD`
11
+ COMMIT_MESSAGE=` git log --oneline | head -n1`
12
+
13
+ REPO_NAME=" material-builds"
14
+ REPO_URL=" http://github.com/DevVersion/material-builds.git"
15
+ REPO_DIR=" tmp/$REPO_NAME "
16
+
17
+ # Create a release of the current repository.
18
+ $( npm bin) /gulp build:release
19
+
20
+ # Prepare cloning the builds repository
21
+ rm -rf $REPO_DIR
22
+ mkdir -p $REPO_DIR
23
+
24
+ # Clone the repository
25
+ git clone $REPO_URL $REPO_DIR
26
+
27
+ # Copy the build files to the repository
28
+ rm -rf $REPO_DIR /*
29
+ cp -r $BUILD_DIR /* $REPO_DIR
30
+
31
+ # Create the build commit and push the changes to the repository.
32
+ cd $REPO_DIR &&
33
+
34
+ # Setup the git repository authentication.
35
+ git config credential.helper " store --file=.git/credentials" &&
36
+ echo " $GITHUB_TOKEN_ANGULAR " > .git/credentials
37
+
38
+ git add -A &&
39
+ git commit -m " $COMMIT_MESSAGE " --author " $COMMIT_AUTHOR " &&
40
+ git tag " $BUILD_VERSION -$COMMIT_SHA " &&
41
+ git push origin master --tags
42
+
43
+ echo " Finished publishing build artifacts"
You can’t perform that action at this time.
0 commit comments