mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Modified release script to create notes only on minor releases
Before, release notes with a list of changes were created every patch release. Unfortunately, it looks like this will create a lot of noise on github, with a notification every patch release, which may be as often as every time a PR is merged. Rather than creating all of this noise for relatively uninteresting changes, the script will now stick to simple tags, and create the release notes only on minor releases. I think this is what several of you were originally suggesting, sorry about the journey, at least I learned a lot.
This commit is contained in:
		
							
								
								
									
										21
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -140,12 +140,13 @@ jobs: | ||||
|         - LFS_VERSION_MINOR=$((0xffff & ($LFS_VERSION >>  0))) | ||||
|         # Grab latests patch from repo tags, default to 0, needs finagling to get past github's pagination api | ||||
|         - PREV_URL=https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs/tags/v$LFS_VERSION_MAJOR.$LFS_VERSION_MINOR. | ||||
|         - PREV_URL=$(curl -f -u "$GEKY_BOT_RELEASES" "$PREV_URL" -I | ||||
|         - PREV_URL=$(curl -u "$GEKY_BOT_RELEASES" "$PREV_URL" -I | ||||
|                 | sed -n '/^Link/{s/.*<\(.*\)>; rel="last"/\1/;p;q0};$q1' | ||||
|                 || echo $PREV_URL) | ||||
|         - LFS_VERSION_PATCH=$(curl -f -u "$GEKY_BOT_RELEASES" "$PREV_URL" | ||||
|         - LFS_VERSION_PATCH=$(curl -u "$GEKY_BOT_RELEASES" "$PREV_URL" | ||||
|                 | jq 'map(.ref | match("\\bv.*\\..*\\.(.*)$";"g") | ||||
|                     .captures[].string | tonumber + 1) | max // 0') | ||||
|                     .captures[].string | tonumber) | max + 1' | ||||
|                 || echo 0) | ||||
|         # We have our new version | ||||
|         - LFS_VERSION="v$LFS_VERSION_MAJOR.$LFS_VERSION_MINOR.$LFS_VERSION_PATCH" | ||||
|         - echo "VERSION $LFS_VERSION" | ||||
| @@ -155,9 +156,19 @@ jobs: | ||||
|                 https://api.github.com/repos/$TRAVIS_REPO_SLUG/commits/master \ | ||||
|                 | jq -re '.sha') | ||||
|           if [ "$TRAVIS_COMMIT" == "$CURRENT_COMMIT" ] | ||||
|           then | ||||
|             # Create a simple tag | ||||
|             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\" | ||||
|                 }" | ||||
|             # Minor release? | ||||
|             if [[ "$LFS_VERSION" == *.0 ]] | ||||
|             then | ||||
|               # Build release notes | ||||
|             PREV=$(git tag --sort=-v:refname -l "v*" | head -1) | ||||
|               PREV=$(git tag --sort=-v:refname -l "v*.0" | head -1) | ||||
|               if [ ! -z "$PREV" ] | ||||
|               then | ||||
|                   echo "PREV $PREV" | ||||
| @@ -170,11 +181,11 @@ jobs: | ||||
|                   https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases \ | ||||
|                   -d "{ | ||||
|                       \"tag_name\": \"$LFS_VERSION\", | ||||
|                     \"target_commitish\": \"$TRAVIS_COMMIT\", | ||||
|                       \"name\": \"${LFS_VERSION%.0}\", | ||||
|                       \"body\": $(jq -sR '.' <<< "$CHANGES") | ||||
|                   }" | ||||
|             fi | ||||
|           fi | ||||
|  | ||||
| # Manage statuses | ||||
| before_install: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user