Skip to content

Instantly share code, notes, and snippets.

@matir91 matir91/
Last active Sep 13, 2017

What would you like to do?
SNAPSHOT Beta release using jenkins
echo "Current branch: $GIT_BRANCH"
CURRENT_COMMIT_HASH=$(git rev-parse --short HEAD)
if [[ $GIT_BRANCH == $MAIN_SNAPSHOT_BRANCH ]] ; then # Cheks if this build is a beta release
IS_BETA_SNAPSHOT_BUILD=true; # Set that the build is a beta snapshot release
TESTER_GROUP='testers' # Set the beta notification group
# Update version name
VERSION_NAME=$(sed -n -e "s/\s*versionName\s*[\"\']\(.*\)[\"\']\s*/\1/p" $GRADLE_FILE)
sed -i -e "s/\(\s*versionName\s*[\"\']\).*\([\"\']\s*\)/\1$NEXT_VERSION_NAME\2/" $GRADLE_FILE
# Create the release notes
git log --pretty=format:"$NEXT_VERSION_NAME: - %s%n%n" -n 1 > release_notes.txt
git log --pretty=format:"Author: %an <%ae>%n%B" -n 1 >> release_notes.txt
echo -e "\n\nLast 10 changes\n" >> release_notes.txt
git log --pretty=format:"• %s (%an - %ci)" HEAD~11..HEAD^ >> release_notes.txt
echo "TESTER_GROUP=$TESTER_GROUP" > # Tester beta group to be notified
echo "IS_BETA_SNAPSHOT_BUILD=$IS_BETA_BUILD" >> # Property that check if it's a SNAPSHOT build.
echo "Property file: "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.