File tree Expand file tree Collapse file tree 2 files changed +70
-0
lines changed
Expand file tree Collapse file tree 2 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ REM Define versions in variables
4+ set " version_old = 1.2025.10"
5+ set " version_new = 1.2025.11beta4"
6+
7+ REM Display versions for verification
8+ echo Old version: %version_old%
9+ echo New version: %version_new%
10+
11+ REM Change directory and run Gradle to build the JAR
12+ cd ../plantuml
13+ echo Running Gradle task to build the JAR...
14+ call ./gradlew jar
15+
16+ REM Check if the Gradle command succeeded
17+ IF %ERRORLEVEL% NEQ 0 (
18+ echo Failed to generate the JAR with Gradle. Stopping the script.
19+ exit /b %ERRORLEVEL%
20+ )
21+
22+ REM Return to the pdiff directory
23+ cd ../pdiff
24+
25+ REM Run the first command
26+ java -cp " ../plantuml/build/libs/plantuml-%version_new% .jar;build/libs/pdiff-all.jar" com.pdiff.Main run
27+
28+ REM Check if the first command succeeded before running the second
29+ IF %ERRORLEVEL% EQU 0 (
30+ echo First command executed successfully. Launching the second command...
31+ java -jar build/libs/pdiff-all.jar diff %version_old% %version_new%
32+ ) ELSE (
33+ echo The first command failed, the second command will not be executed.
34+ )
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ # Define versions in variables
6+ version_old=" 1.2025.10"
7+ version_new=" 1.2025.11beta5"
8+
9+ # Display versions for verification
10+ echo " Old version: $version_old "
11+ echo " New version: $version_new "
12+
13+ # Change directory and run Gradle to build the JAR
14+ cd ../plantuml || { echo " Cannot cd to ../plantuml" ; exit 1; }
15+ echo " Running Gradle task to build the JAR..."
16+ ./gradlew jar
17+
18+ # Check if Gradle succeeded
19+ if [ $? -ne 0 ]; then
20+ echo " Failed to generate the JAR with Gradle. Stopping the script."
21+ exit 1
22+ fi
23+
24+ # Return to the pdiff directory
25+ cd ../pdiff || { echo " Cannot cd to ../pdiff" ; exit 1; }
26+
27+ # Run the first command
28+ java -cp " ../plantuml/build/libs/plantuml-${version_new} .jar:build/libs/pdiff-all.jar" com.pdiff.Main run
29+
30+ # Check first command result and run second if successful
31+ if [ $? -eq 0 ]; then
32+ echo " First command executed successfully. Launching the second command..."
33+ java -jar build/libs/pdiff-all.jar diff " $version_old " " $version_new "
34+ else
35+ echo " The first command failed, the second command will not be executed."
36+ fi
You can’t perform that action at this time.
0 commit comments