-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retire the old BuildEnumerator system.
It has not been used at all lately, and frankly it should not be used. It has been causing problems with build number being updated downstream causing the version check to fail. In the future we will update the build number manually, incrementing it with some fixed number on each release.
- Loading branch information
Showing
6 changed files
with
7 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1 @@ | ||
@echo off | ||
|
||
:begin | ||
setlocal | ||
pushd %~dp0 | ||
|
||
set SOURCES_DIR=%~dp0src | ||
set BUILDENUM_CP="%~dp0lib\buildenumerator.jar" | ||
|
||
echo Incrementing build number... | ||
java -cp %BUILDENUM_CP% BuildEnumerator "%SOURCES_DIR%\org\catacombae\hfsexplorer\BuildNumber.java" 1 | ||
|
||
echo Building with ant... | ||
call ant build-all | ||
if not "%ERRORLEVEL%"=="0" goto error | ||
|
||
goto end | ||
|
||
:error | ||
echo There were errors... | ||
echo Decrementing build number... | ||
java -cp %BUILDENUM_CP% BuildEnumerator "%SOURCES_DIR%\org\catacombae\hfsexplorer\BuildNumber.java" -1 | ||
goto end | ||
|
||
:end | ||
popd | ||
endlocal | ||
@ant build-all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,3 @@ | ||
#!/bin/sh | ||
|
||
JAVAC_CMD="${JAVA_HOME:+${JAVA_HOME}/bin/}javac" | ||
SOURCES_DIR=src | ||
BUILDENUM_CP=lib/buildenumerator.jar | ||
|
||
echo "javac command: ${JAVAC_CMD}" | ||
|
||
error() { | ||
decrement_buildnumber | ||
echo "There were errors..." | ||
} | ||
|
||
jobCompleted() { | ||
echo "Done!" | ||
} | ||
|
||
increment_buildnumber() { | ||
echo "Incrementing build number..." | ||
java -cp $BUILDENUM_CP BuildEnumerator $SOURCES_DIR/org/catacombae/hfsexplorer/BuildNumber.java 1 | ||
} | ||
|
||
decrement_buildnumber() { | ||
echo "Decrementing build number..." | ||
java -cp $BUILDENUM_CP BuildEnumerator $SOURCES_DIR/org/catacombae/hfsexplorer/BuildNumber.java -1 | ||
} | ||
|
||
antbuild() { | ||
echo "Building with ant..." | ||
ant build-all | ||
return $? | ||
} | ||
|
||
main() { | ||
increment_buildnumber | ||
antbuild | ||
if [ "$?" -eq 0 ]; then | ||
jobCompleted | ||
return 0 | ||
else | ||
error | ||
return -1 | ||
fi | ||
} | ||
|
||
#entry point | ||
main | ||
ant build-all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
@ant compilejparted | ||
@ant build-jparted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,3 @@ | ||
#!/bin/sh | ||
|
||
error() { | ||
echo "There were errors..." | ||
} | ||
|
||
jobCompleted() { | ||
echo "Done!" | ||
} | ||
|
||
JAVAC_CMD="${JAVA_HOME:+${JAVA_HOME}/bin/}javac" | ||
JAVAC_DEFAULT_ARGS="-target 1.5 -source 1.5 -encoding utf-8" | ||
CLASSPATH=build.~:dist/lib/catacombae_io.jar:dist/lib/swing-layout-1.0.3.jar:dist/lib/hfsx_dmglib.jar:lib/java_awt_Desktop.jar | ||
SOURCES_DIR=src | ||
BUILD_DIR=build.~ | ||
LIBRARY_PATH=lib | ||
JARFILE_DIR=dist/lib | ||
JARFILE=jparted.jar | ||
RESOURCE_SRC_DIR=resource | ||
RESOURCE_DST_DIR=$BUILD_DIR/res | ||
BUILDENUM_CP=lib/buildenumerator.jar | ||
|
||
removeclassfiles() { | ||
echo "Removing all class files..." | ||
rm -r $BUILD_DIR | ||
mkdir $BUILD_DIR | ||
return $? | ||
} | ||
|
||
buildjparted() { | ||
echo "Building org.catacombae.jparted.app..." | ||
"${JAVAC_CMD}" $JAVAC_DEFAULT_ARGS -cp $CLASSPATH -sourcepath $SOURCES_DIR -d $BUILD_DIR -Xlint:unchecked $SOURCES_DIR/org/catacombae/jparted/app/*.java | ||
return $? | ||
} | ||
|
||
buildjar() { | ||
echo "Building jar-file..." | ||
if [ ! -d "$JARFILE_DIR" ]; then # if not exists $LIBRARY_PATH... | ||
echo "Making library path" | ||
mkdir $JARFILE_DIR | ||
fi | ||
jar cf $JARFILE_DIR/$JARFILE -C $BUILD_DIR . | ||
return $? | ||
} | ||
|
||
main() { | ||
removeclassfiles | ||
if [ "$?" -eq 0 ]; then | ||
buildjparted | ||
if [ "$?" -eq 0 ]; then | ||
buildjar | ||
if [ "$?" -eq 0 ]; then | ||
jobCompleted | ||
else | ||
error | ||
fi | ||
else | ||
error | ||
fi | ||
else | ||
error | ||
fi | ||
} | ||
|
||
#entry point | ||
main | ||
ant build-jparted |
Binary file not shown.