forked from RFD-FHEM/SIGNALDuino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·31 lines (28 loc) · 1.15 KB
/
deploy.sh
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
#!/bin/bash
set -e
if [[ ${TRAVIS_TAG} =~ ^release.*$ || $TRAVIS_TAG =~ ^R\d\.\d.*$ && "$TRAVIS_BRANCH" = "dev-r33_cc1101" ]]
then
curl --location "https://github.com/tfausak/github-release/releases/download/1.1.4/github-release-1.1.4-$TRAVIS_OS_NAME.gz" > github-release.gz
gunzip github-release.gz
./github-release upload \
--token "$GH_API_KEY" \
--owner Sidey79 \
--repo RFD-FHEM/SIGNALDuino \
--tag "$TRAVIS_TAG" \
--file "$PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex" \
--name "SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}"
fi
if [[ $TRAVIS_TAG =~ ^nightly.*$ ]]
then
DATE=`date +%Y-%m-%d`
curl --location "https://github.com/tfausak/github-release/releases/download/1.1.4/github-release-1.1.4-$TRAVIS_OS_NAME.gz" > github-release.gz
gunzip github-release.gz
chmod +x ./github-release
./github-release upload \
--token "$GH_API_KEY" \
--owner Sidey79 \
--repo RFD-FHEM/SIGNALDuino \
--file "$PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex" \
--name "nightly-SIGNALDuino_${BOARD}${RECEIVER}${DATE}" \
--tag "$TRAVIS_TAG"
fi