mirror of
https://github.com/eledio-devices/thirdparty-littlefs.git
synced 2025-11-01 08:48:31 +01:00
Compare commits
1 Commits
fix-tell-r
...
patch-rele
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8be114e77 |
26
.travis.yml
26
.travis.yml
@@ -248,34 +248,30 @@ jobs:
|
|||||||
-m "Generated v$LFS_VERSION_MAJOR prefixes")
|
-m "Generated v$LFS_VERSION_MAJOR prefixes")
|
||||||
git reset --hard
|
git reset --hard
|
||||||
# Update major version branches (vN and vN-prefix)
|
# Update major version branches (vN and vN-prefix)
|
||||||
git push https://$GEKY_BOT_RELEASES@github.com/$TRAVIS_REPO_SLUG.git \
|
git push --atomic https://$GEKY_BOT_RELEASES@github.com/$TRAVIS_REPO_SLUG.git \
|
||||||
v$LFS_VERSION_MAJOR \
|
v$LFS_VERSION_MAJOR \
|
||||||
v$LFS_VERSION_MAJOR-prefix
|
v$LFS_VERSION_MAJOR-prefix
|
||||||
# Create patch version tag (vN.N.N)
|
|
||||||
curl -f -u "$GEKY_BOT_RELEASES" -X POST \
|
|
||||||
https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs \
|
|
||||||
-d "{
|
|
||||||
\"ref\": \"refs/tags/$LFS_VERSION\",
|
|
||||||
\"sha\": \"$TRAVIS_COMMIT\"
|
|
||||||
}"
|
|
||||||
# Create minor release?
|
|
||||||
[[ "$LFS_VERSION" == *.0 ]] || exit 0
|
|
||||||
# Build release notes
|
# Build release notes
|
||||||
PREV=$(git tag --sort=-v:refname -l "v*.0" | head -1)
|
PREV=$(git tag --sort=-v:refname -l "v*" | head -1)
|
||||||
if [ ! -z "$PREV" ]
|
if [ ! -z "$PREV" ]
|
||||||
then
|
then
|
||||||
echo "PREV $PREV"
|
echo "PREV $PREV"
|
||||||
CHANGES=$'### Changes\n\n'$( \
|
CHANGES=$(git log --oneline $PREV.. --grep='^Merge' --invert-grep)
|
||||||
git log --oneline $PREV.. --grep='^Merge' --invert-grep)
|
|
||||||
printf "CHANGES\n%s\n\n" "$CHANGES"
|
printf "CHANGES\n%s\n\n" "$CHANGES"
|
||||||
fi
|
fi
|
||||||
# Create the release
|
case ${GEKY_BOT_DRAFT:-minor} in
|
||||||
|
true) DRAFT=true ;;
|
||||||
|
minor) DRAFT=$(jq -R 'endswith(".0")' <<< "$LFS_VERSION") ;;
|
||||||
|
false) DRAFT=false ;;
|
||||||
|
esac
|
||||||
|
# Create the release and patch version tag (vN.N.N)
|
||||||
curl -f -u "$GEKY_BOT_RELEASES" -X POST \
|
curl -f -u "$GEKY_BOT_RELEASES" -X POST \
|
||||||
https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases \
|
https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases \
|
||||||
-d "{
|
-d "{
|
||||||
\"tag_name\": \"$LFS_VERSION\",
|
\"tag_name\": \"$LFS_VERSION\",
|
||||||
\"name\": \"${LFS_VERSION%.0}\",
|
\"name\": \"${LFS_VERSION%.0}\",
|
||||||
\"draft\": true,
|
\"target_commitish\": \"$TRAVIS_COMMIT\",
|
||||||
|
\"draft\": $DRAFT,
|
||||||
\"body\": $(jq -sR '.' <<< "$CHANGES")
|
\"body\": $(jq -sR '.' <<< "$CHANGES")
|
||||||
}" #"
|
}" #"
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|||||||
Reference in New Issue
Block a user