Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2018-01-28 20:00:59 +0300
committerChristopher Haster <chaster@utexas.edu>2018-01-29 09:51:43 +0300
commit5a38d00dde905dc91ef97b4122c4a60e37c18472 (patch)
tree9e61b9a3cf283d985d00bb701dc02416055553fd /.travis.yml
parent035552a858f562872d9c47809606fbe329106030 (diff)
Added deploy step in Travis to push new version as tags
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index eb904c9..eea6601 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -45,3 +45,31 @@ before_script:
- sudo chmod a+rw /dev/loop0
- dd if=/dev/zero bs=512 count=2048 of=disk
- losetup /dev/loop0 disk
+
+deploy:
+ # Let before_deploy take over
+ provider: script
+ script: 'true'
+ on:
+ branch: master
+
+before_deploy:
+ - cd $TRAVIS_BUILD_DIR
+ # Update tag for version defined in lfs.h
+ - LFS_VERSION=$(grep -ox '#define LFS_VERSION .*' lfs.h | cut -d ' ' -f3)
+ - LFS_VERSION_MAJOR=$((0xffff & ($LFS_VERSION >> 16)))
+ - LFS_VERSION_MINOR=$((0xffff & ($LFS_VERSION >> 0)))
+ - LFS_VERSION="v$LFS_VERSION_MAJOR.$LFS_VERSION_MINOR"
+ - |
+ curl -u $GEKY_BOT -X POST \
+ https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs \
+ -d @- <<< "{
+ \"ref\": \"refs/tags/$LFS_VERSION\",
+ \"sha\": \"$TRAVIS_COMMIT\"
+ }"
+ - |
+ curl -f -u $GEKY_BOT -X PATCH \
+ https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs/tags/$LFS_VERSION \
+ -d @- <<< "{
+ \"sha\": \"$TRAVIS_COMMIT\"
+ }"