Commit 62aeb1f5 authored by Noah Prail's avatar Noah Prail

build: Improve build script

parent c3b1cfbe
Pipeline #10783 passed with stages
in 3 minutes and 34 seconds
......@@ -17,10 +17,7 @@ build:
- if [ -n "${VERSION}" ]; then export RELEASE=true && echo "Release Version"; fi
- export VERSION=${VERSION:-"${DEFAULT_VERSION}"}
script:
- echo "Building ${VERSION}"
- sh scripts/builder.sh
- if [ -n "${RELEASE}" ]; then cp bin/caddy bin/caddy-${VERSION}; fi
- bin/caddy -version
artifacts:
paths:
- bin/
......
......@@ -2,6 +2,8 @@
VERSION=${VERSION:-"1.0.0"}
echo "Building ${VERSION}"
export GO111MODULE=on
go mod init caddy
......@@ -10,4 +12,8 @@ go get github.com/mholt/caddy@v${VERSION}
go build
mkdir -p bin && cp caddy bin/
\ No newline at end of file
mkdir -p bin && mv caddy bin/
if [ -n "${RELEASE}" ]; then cp bin/caddy bin/caddy-${VERSION}; fi
bin/caddy -version
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment