Cleaning up compile scripts
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- Debugging removed from `compile_vergen.sh` - `compile.sh` modified to use a for loop for each command & only continue if previous steps succeeded.
This commit is contained in:
parent
d4236f455e
commit
f0dc598f44
30
compile.sh
30
compile.sh
@ -20,26 +20,28 @@ runOrFail() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
runOrFail $(pwd)/compile_stub.sh "Failed to compile stub!"
|
declare -a run_steps=(
|
||||||
|
'compile_stub.sh "Failed to compile stub!"'
|
||||||
|
'compile_vergen.sh "Versions failed to compile"'
|
||||||
|
'compile_sources.sh "Failed to compile FPC Sources!"'
|
||||||
|
'compile_link.sh "Failed linking!"'
|
||||||
|
'compile_isogen.sh "Failed to create ISO!"'
|
||||||
|
)
|
||||||
|
|
||||||
#Generate .pas with versioning headers.
|
for command in "${run_steps[@]}"
|
||||||
runOrFail $(pwd)/compile_vergen.sh "Versions failed to compile"
|
do
|
||||||
|
if [ "$ERRCOUNT" -eq "0" ]
|
||||||
#Compile all .pas sources
|
then
|
||||||
runOrFail $(pwd)/compile_sources.sh "Failed to compile FPC Sources!"
|
runOrFail $(pwd)/$command
|
||||||
|
fi
|
||||||
#Link into a binary.
|
done
|
||||||
runOrFail $(pwd)/compile_link.sh "Failed linking!"
|
|
||||||
|
|
||||||
#Generate an ISO with GRUB as the Bootloader.
|
|
||||||
runOrFail ./compile_isogen.sh "Failed to create ISO!"
|
|
||||||
|
|
||||||
#Call generate final artifacts based on failure or success of the above.
|
#Call generate final artifacts based on failure or success of the above.
|
||||||
if [ "$ERRCOUNT" -ne "0" ]
|
if [ "$ERRCOUNT" -ne "0" ]
|
||||||
then
|
then
|
||||||
./compile_finish.sh "failed"
|
. ./compile_finish.sh "failed"
|
||||||
else
|
else
|
||||||
./compile_finish.sh "success"
|
. ./compile_finish.sh "success"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ..
|
cd ..
|
@ -14,8 +14,6 @@ file="version"
|
|||||||
wget -q https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver -O bin/semver && chmod +x bin/semver
|
wget -q https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver -O bin/semver && chmod +x bin/semver
|
||||||
export PATH="$(pwd)/bin:$PATH"
|
export PATH="$(pwd)/bin:$PATH"
|
||||||
}
|
}
|
||||||
pwd
|
|
||||||
ls
|
|
||||||
tagref=$(git describe --tags)
|
tagref=$(git describe --tags)
|
||||||
revision=$(git rev-parse --short=8 HEAD)
|
revision=$(git rev-parse --short=8 HEAD)
|
||||||
major=$(semver get major $tagref)
|
major=$(semver get major $tagref)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user