Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2215359

Browse files
committed
Changed scripts to automatically deploy when a tag build occurs.
1 parent 0729cc9 commit 2215359

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
site/
88
pages/
99
release/
10-
utplsql.tar.gz
11-
utplsql.zip
10+
*.gz
11+
*.zip

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ script:
6363
# - bash .travis/build_docs.sh
6464
# - bash .travis/push_docs_to_gh_pages.sh
6565

66+
deploy:
67+
provider: releases
68+
api_key: $github_api_token
69+
file:
70+
- utPLSQL$TRAVIS_TAG.zip
71+
- utPLSQL$TRAVIS_TAG.tar.gz
72+
skip_cleanup:true
73+
on:
74+
repo: utPLSQL/utPLSQL
75+
tags: true
76+
6677
notifications:
6778
slack: utplsql:oiMuXO95TvKeAUENuDt4cPrB
6879

80+

.travis/create_release_archive.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,14 @@ cp -r LICENSE release/
1919
cp -r authors.md release/
2020
cp -r CONTRIBUTING.md release/
2121
cd release
22-
zip -r ../utplsql.zip *
23-
tar -zcvf ../utplsql.tar.gz *
22+
#Although the $TRAVIS_TAG versions are the only one used. They are conditional,
23+
#and we want the process always run to insure we don't have problems with building archive
24+
#when we finally tag a release
25+
zip -r ../utPLSQL.zip *
26+
tar -zcvf ../utPLSQL.tar.gz *
27+
#Name of archive will match tag name for a release.
28+
if [ -n "$TRAVIS_TAG" ]; then
29+
cd ..
30+
cp utPLSQL.zip utPLSQL$TRAVIS_TAG.zip
31+
cp utPLSQL.tar.gz utPLSQL$TRAVIS_TAG.tar.gz
32+
fi

0 commit comments

Comments
 (0)