Skip to content

Commit

Permalink
Release script improvements
Browse files Browse the repository at this point in the history
- create (annotated) tag with a message
- avoid using tycho.mode
  • Loading branch information
adangel committed Mar 22, 2024
1 parent 454031c commit a7076e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions do-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "-------------------------------------------"
echo "Releasing PMD Eclipse Plugin"
echo "-------------------------------------------"

CURRENT_VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout -Dtycho.mode=maven)
CURRENT_VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
MAJOR=$(echo "$RELEASE_VERSION" | cut -d . -f 1)
MINOR=$(echo "$RELEASE_VERSION" | cut -d . -f 2)
Expand Down Expand Up @@ -76,9 +76,9 @@ echo "And also remove any empty/unnecessary sections"
echo
echo "Press enter to continue..."
read -r
./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion="${RELEASE_VERSION}.${BUILDQUALIFIER}" -Dtycho.mode=maven
./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion="${RELEASE_VERSION}.${BUILDQUALIFIER}"
git commit -a -m "Prepare release pmd-eclipse-plugin ${RELEASE_VERSION}.${BUILDQUALIFIER}"
git tag "${RELEASE_VERSION}.${BUILDQUALIFIER}"
git tag -m "Release version ${RELEASE_VERSION}.${BUILDQUALIFIER}" "${RELEASE_VERSION}.${BUILDQUALIFIER}"
echo "Create (temporary) release branch"
git branch "pmd-eclipse-plugin-rb-${RELEASE_VERSION}"

Expand Down Expand Up @@ -109,7 +109,7 @@ EOF

echo
echo "Updating version in master to next"
./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion="${DEVELOPMENT_VERSION}-SNAPSHOT" -Dtycho.mode=maven
./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion="${DEVELOPMENT_VERSION}-SNAPSHOT"
git commit -a -m "Prepare next pmd-eclipse-plugin development version ${DEVELOPMENT_VERSION}-SNAPSHOT"
echo "Pushing master"
git push origin master
Expand Down

0 comments on commit a7076e3

Please sign in to comment.