Skip to content

Commit

Permalink
update version scripts for Windows/Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jpstotz committed Mar 16, 2024
1 parent 6c3710c commit f899e9d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.project
**/bin/
**/target
22 changes: 22 additions & 0 deletions update-version.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@Echo off
REM This script is used for updating the version of the whole plugin.
REM
REM Usage: ./update-version.sh VERSION
REM Example: ./update-version.sh 3.1.0-SNAPSHOT

REM Note that automatically updating the version only works when the versions
REM in the files have not been manually edited and actually match the current
REM version.

SET VERSION="%*"

if "%~1"=="" goto blank

call mvn org.eclipse.tycho:tycho-versions-plugin:4.0.6:set-version -DnewVersion="%VERSION%" -Dtycho.mode=maven
call mvn org.eclipse.tycho:tycho-versions-plugin:4.0.6:update-eclipse-metadata -DnewVersion="%VERSION%" -Dtycho.mode=maven
goto end

:blank
echo "update-version.cmd VERSION"

:end
9 changes: 2 additions & 7 deletions update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,5 @@ if [ -z "$VERSION" ]; then
exit 1
fi

mvn \
org.eclipse.tycho:tycho-versions-plugin:3.0.4:set-version \
-DnewVersion="$VERSION" -Dtycho.mode=maven

mvn \
org.eclipse.tycho:tycho-versions-plugin:3.0.4:update-eclipse-metadata \
-DnewVersion="$VERSION" -Dtycho.mode=maven
mvn org.eclipse.tycho:tycho-versions-plugin:4.0.6:set-version -DnewVersion="$VERSION" -Dtycho.mode=maven
mvn org.eclipse.tycho:tycho-versions-plugin:4.0.6:update-eclipse-metadata -DnewVersion="$VERSION" -Dtycho.mode=maven

0 comments on commit f899e9d

Please sign in to comment.