diff options
author | heqnx <root@heqnx.com> | 2025-06-04 12:10:09 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-06-04 12:10:09 +0300 |
commit | f8a89cb75245b8eff296cf85ca536357ece3abbe (patch) | |
tree | 1fc0aa626c685102103699b52416b7596aed5613 /build-release.sh | |
parent | 9d088faeeebc2687eb62eb718a0a851ed2d741cb (diff) | |
download | SharpRIDHijack-f8a89cb75245b8eff296cf85ca536357ece3abbe.tar.gz SharpRIDHijack-f8a89cb75245b8eff296cf85ca536357ece3abbe.zip |
updated build script
Diffstat (limited to 'build-release.sh')
-rwxr-xr-x | build-release.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/build-release.sh b/build-release.sh new file mode 100755 index 0000000..e4909e9 --- /dev/null +++ b/build-release.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e + +if ! command -v docker; then + printf "%s\n" "[err] docker not found" + exit 1 +fi + +docker run --rm -it -v $(pwd):/mnt mono:latest bash -c ' +DEBIAN_FRONTEND=noninteractive apt-get update +DEBIAN_FRONTEND=noninteractive apt-get install -y git zip +git config --global --add safe.directory /mnt +cd /mnt +mkdir -p build +REPO_NAME=$(basename $(git remote get-url origin)) +REPO_NAME="${REPO_NAME%.git}" + +nuget restore SharpRIDHijack.sln +msbuild SharpRIDHijack.sln /p:Configuration=Release /p:Platform="Any CPU" +msbuild SharpRIDHijack.sln /p:Configuration=Release /p:Platform=x64 +msbuild SharpRIDHijack.sln /p:Configuration=Release /p:Platform=x86 + +mv SharpRIDHijack/bin/Release/SharpRIDHijack.exe build/SharpRIDHijack-AnyCPU.exe +mv SharpRIDHijack/bin/x64/Release/SharpRIDHijack.exe build/SharpRIDHijack-x64.exe +mv SharpRIDHijack/bin/x86/Release/SharpRIDHijack.exe build/SharpRIDHijack-x86.exe + +zip -r "${REPO_NAME}-release.zip" LICENSE README.md build/ +rm -rf SharpRIDHijack/bin SharpRIDHijack/obj +rm -rf build +' + +printf "%s\n" "[inf] finished building ${repo_name}" |