1 | #!/bin/sh
|
2 |
|
3 | setup_git() {
|
4 | git config --global user.email "${ENV_EMAIL}"
|
5 | git config --global user.name "${TRAVIS_USERNAME}"
|
6 | }
|
7 |
|
8 | reset() {
|
9 | > _version.txt
|
10 | }
|
11 |
|
12 | build() {
|
13 | npm run build
|
14 | }
|
15 |
|
16 | update_version() {
|
17 | CURRENT_VERSION=$(node -p "require('./package.json').version")
|
18 | echo "$CURRENT_VERSION" >> scripts/_version.txt
|
19 | }
|
20 |
|
21 | commit_files() {
|
22 | git checkout master
|
23 | ls -al
|
24 | git status
|
25 | cd dist
|
26 | git add .
|
27 | cd ..
|
28 | ls -al
|
29 | git status
|
30 | git commit --message "[travis-ci skip] Travis build: ${TRAVIS_BUILD_NUMBER}; Updating operationkit.min.js"
|
31 | }
|
32 |
|
33 | upload_files() {
|
34 | git push "https://${ENV_GITHUB_USERNAME}:${ENV_GITHUB_PASSWORD}@github.com/dannyYassine/operationkit.git/"
|
35 | }
|
36 |
|
37 | setup_git
|
38 | reset
|
39 | build
|
40 | update_version
|
41 | commit_files
|
42 | upload_files |
\ | No newline at end of file |