diff options
author | heqnx <root@heqnx.com> | 2025-08-06 12:22:31 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-08-06 12:22:31 +0300 |
commit | 2fc27e5b3b802dcc77a0299f99b97056712c92e3 (patch) | |
tree | 4c0d6f6ca74ab9f7eb9b2600ed1696dfd88e47d8 /build-release.sh | |
parent | 910fb7f2078e5e0a576dbb465bc7b3eb61bd474c (diff) | |
download | go-http-logger-2fc27e5b3b802dcc77a0299f99b97056712c92e3.tar.gz go-http-logger-2fc27e5b3b802dcc77a0299f99b97056712c92e3.zip |
initial commit
Diffstat (limited to 'build-release.sh')
-rw-r--r-- | build-release.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/build-release.sh b/build-release.sh new file mode 100644 index 0000000..5f1b978 --- /dev/null +++ b/build-release.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +if ! command -v docker &>/dev/null; then + printf "%s\n" "[err] docker not found" + exit 1 +fi + +docker run --rm -it -v $(pwd):/mnt golang:latest /bin/bash -c ' +git config --global --add safe.directory /mnt +DEBIAN_FRONTEND=noninteractive apt-get update +DEBIAN_FRONTEND=noninteractive apt-get install -y make zip git + +( + cd /mnt + REPO_NAME=$(basename $(git remote get-url origin)) + REPO_NAME="${REPO_NAME%.git}" + make all + zip -r "${REPO_NAME}-release.zip" LICENSE README.md build/ + make clean +) +' |