Commit b83970d1 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Link binary statically

parent c3b9ff01
Pipeline #44900 passed with stages
in 1 minute and 32 seconds
...@@ -20,7 +20,7 @@ lint: ...@@ -20,7 +20,7 @@ lint:
build: build:
stage: build stage: build
script: script:
- make build - make build-static
artifacts: artifacts:
paths: paths:
- feudalClient - feudalClient
......
...@@ -17,9 +17,14 @@ lint: dep ## Lint the files ...@@ -17,9 +17,14 @@ lint: dep ## Lint the files
test: ## Run unittests test: ## Run unittests
@go test -short ${PKG_LIST} @go test -short ${PKG_LIST}
# link dynamically
build: dep ## Build the binary file build: dep ## Build the binary file
@go build -i -v $(PKG) @go build -i -v $(PKG)
# link statically
build-static: dep ## Build the binary file
@CGO_ENABLED=0 GOOS=linux go build -v -ldflags '-extldflags "-static"' $(PKG)
clean: ## Remove previous build clean: ## Remove previous build
@rm -f $(PROJECT_NAME) @rm -f $(PROJECT_NAME)
......
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