diff --git a/scripts/package-svcomp.sh b/scripts/package-svcomp.sh index fc53cf1b..45da708a 100755 --- a/scripts/package-svcomp.sh +++ b/scripts/package-svcomp.sh @@ -8,7 +8,8 @@ set -euo pipefail # Set SWAT_SVCOMP_ARTIFACT_DIR only if those generated files live somewhere # else. The artifact root must contain: # -# - symbolic-executor/lib/symbolic-executor.jar +# - symbolic-executor/lib/symbolic-executor.jar, or symbolic-executor.jar at the +# root (actions/upload-artifact drops the directories of a single-file upload) # # Set SWAT_SVCOMP_PYTHON_DIR to the Python dependency directory produced by # scripts/build-svcomp-python-runtime.sh (it includes the witnesscreator @@ -127,6 +128,7 @@ install -m 0644 targets/sv-comp/sv-comp.cfg "$PACKAGE_DIR/sv-comp.cfg" EXECUTOR_JAR="$(first_artifact_file \ symbolic-executor/lib/symbolic-executor.jar \ + symbolic-executor.jar \ symbolic-executor/build/libs/symbolic-executor-all.jar)" copy_artifact_file "$EXECUTOR_JAR" "$PACKAGE_DIR/symbolic-executor/lib/symbolic-executor.jar" diff --git a/scripts/svcomp-package/run-swat.sh b/scripts/svcomp-package/run-swat.sh index a10bb7b5..8a454e19 100755 --- a/scripts/svcomp-package/run-swat.sh +++ b/scripts/svcomp-package/run-swat.sh @@ -7,6 +7,13 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" for arg in "$@" do if [ "$arg" == "-v" ] || [ "$arg" == "--version" ]; then + # The package version (e.g. svcomp27-rc1) from BUILD_INFO.txt, written by + # scripts/package-svcomp.sh. + version="$(sed -n 's/^version=//p' "$SCRIPT_DIR/BUILD_INFO.txt" 2>/dev/null)" + if [ -n "$version" ]; then + echo "$version" + exit 0 + fi exec java -cp "$SCRIPT_DIR/symbolic-executor/lib/symbolic-executor.jar" de.uzl.its.swat.Version fi done