aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheqnx <root@heqnx.com>2025-06-04 12:10:26 +0300
committerheqnx <root@heqnx.com>2025-06-04 12:10:26 +0300
commita84b5a7f65fc19411a927cae34af3a427b53a598 (patch)
tree62d71157bee216c7295d0b9009455b8cdd85dd44
parent4444943159384b2cd6fcd91535e3b946f17a9a80 (diff)
downloadSharpAMSIGhosting-a84b5a7f65fc19411a927cae34af3a427b53a598.tar.gz
SharpAMSIGhosting-a84b5a7f65fc19411a927cae34af3a427b53a598.zip
updated build script
-rwxr-xr-xbuild-release.sh32
-rwxr-xr-xbuild.sh25
2 files changed, 32 insertions, 25 deletions
diff --git a/build-release.sh b/build-release.sh
new file mode 100755
index 0000000..56fad6a
--- /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 SharpAMSIGhosting.sln
+msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform="Any CPU"
+msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform=x64
+msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform=x86
+
+mv SharpAMSIGhosting/bin/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-AnyCPU.exe
+mv SharpAMSIGhosting/bin/x64/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-x64.exe
+mv SharpAMSIGhosting/bin/x86/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-x86.exe
+
+zip -r "${REPO_NAME}-release.zip" LICENSE README.md build/
+rm -rf SharpAMSIGhosting/bin SharpAMSIGhosting/obj
+rm -rf build
+'
+
+printf "%s\n" "[inf] finished building ${repo_name}"
diff --git a/build.sh b/build.sh
deleted file mode 100755
index dac3ecf..0000000
--- a/build.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-set -e
-
-if ! command -v docker; then
- printf "%s\n" "[err] docker not found"
- exit 1
-fi
-
-repo_name=$( basename -s .git $(git remote get-url origin) )
-
-docker run --rm -it -v $(pwd):/app -w /app mono:latest bash -c '
- set -e
- mkdir -p build
-
- nuget restore SharpAMSIGhosting.sln
- msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform="Any CPU"
- msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform=x64
- msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform=x86
-
- cp SharpAMSIGhosting/bin/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-AnyCPU.exe
- cp SharpAMSIGhosting/bin/x64/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-x64.exe
- cp SharpAMSIGhosting/bin/x86/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-x86.exe
-'
-
-printf "%s\n" "[inf] finished building ${repo_name}"