UNPKG

741 Bapplication/x-shView Raw
1#!/bin/sh
2
3setup_git() {
4 git config --global user.email "${ENV_EMAIL}"
5 git config --global user.name "${TRAVIS_USERNAME}"
6}
7
8reset() {
9 > _version.txt
10}
11
12build() {
13 npm run build
14}
15
16update_version() {
17 CURRENT_VERSION=$(node -p "require('./package.json').version")
18 echo "$CURRENT_VERSION" >> scripts/_version.txt
19}
20
21commit_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
33upload_files() {
34 git push "https://${ENV_GITHUB_USERNAME}:${ENV_GITHUB_PASSWORD}@github.com/dannyYassine/operationkit.git/"
35}
36
37setup_git
38reset
39build
40update_version
41commit_files
42upload_files
\No newline at end of file