-
-
Notifications
You must be signed in to change notification settings - Fork 228
/
Copy path.travis.yml
72 lines (68 loc) · 2.43 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
dist: trusty
sudo: false
language: node_js
node_js:
- "10"
cache:
directories:
- ./node_modules
install:
- npm install
jobs:
include:
- stage: lint
if: branch = master
name: "Linting Application ..."
script: ng lint
- stage: build
if: type = push AND branch != master OR type = pull_request
name: "Building Application ..."
script: npm run ng:build
- stage: build
if: type = push AND branch = master
name: "Building Application ..."
script: npm run pack
# - stage: deploy
# if: type = push AND branch = master
# name: "Deploying..."
# script:
# - |
# git config --global user.email "[email protected]"
# git config --global user.name "UnchartedBull"
# git config --global push.default current
# touch .git/credentials
# echo "https://UnchartedBull:${GITHUB_TOKEN}@github.com" > .git/credentials
# git config credential.helper "store --file=.git/credentials"
# git checkout -- .
# - gem install github_changelog_generator
# - |
# COMMIT=$(git log -1 --pretty=%B)
# VERSION_BUMP="patch"
# - |
# if [ $COMMIT == *"[version major]"* ]; then VERSION_BUMP="major"; fi;
# if [ $COMMIT == *"[version minor]"* ]; then VERSION_BUMP="minor"; fi;
# - |
# if [ $COMMIT == *"[release]"* ]; then
# echo "received commit message - "$COMMIT
# echo "bumping version ("$VERSION_BUMP")"
# npm version $VERSION_BUMP -m "[skip ci] bump package version to v%s"
# github_changelog_generator -t $GITHUB_TOKEN
# git add -A CHANGELOG.md
# git commit --amend --no-edit
# git push origin HEAD:$TRAVIS_BRANCH
# npm run pack
# mv package/*armv7l.deb OctoDash_$(git describe --tags $(git rev-list --tags --max-count=1))_armv7l.deb
# mv package/*arm64.deb OctoDash_$(git describe --tags $(git rev-list --tags --max-count=1))_arm64.deb
# export TRAVIS_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
# fi;
# deploy:
# provider: releases
# api_key: $GITHUB_TOKEN
# skip_cleanup: true
# draft: true
# on:
# tags: true
# file_glob: true
# file:
# - "OctoDash_*_armv7l.deb"
# - "OctoDash_*_arm64.deb"