Skip to content

Commit

Permalink
Make Github Actions compile statically linked binaries (#140)
Browse files Browse the repository at this point in the history
* Make goxc compile statically binaries

* Bump version on Makefile

* Bump version in other files too

* Use CGO_ENABLED env var
  • Loading branch information
gmpify committed May 10, 2021
1 parent 2043f0d commit bb10365
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=1.5.0
VERSION=1.5.1
PATH_BUILD=build/
FILE_COMMAND=terragrunt-atlantis-config
FILE_ARCH=darwin_amd64
Expand All @@ -16,6 +16,7 @@ clean:

.PHONY: build
build: clean
CGO_ENABLED=0 \
goxc \
-bc="darwin,amd64" \
-pv=$(VERSION) \
Expand All @@ -24,6 +25,7 @@ build: clean

.PHONY: build-all
build-all: clean
CGO_ENABLED=0 \
goxc \
-os="$(XC_OS)" \
-arch="$(XC_ARCH)" \
Expand Down Expand Up @@ -55,4 +57,4 @@ sign: build-all
.PHONY: install
install:
install -d -m 755 '$(HOME)/bin/'
install $(PATH_BUILD)$(FILE_COMMAND)/$(VERSION)/$(FILE_COMMAND)_$(VERSION)_$(FILE_ARCH) '$(HOME)/bin/$(FILE_COMMAND)'
install $(PATH_BUILD)$(FILE_COMMAND)/$(VERSION)/$(FILE_COMMAND)_$(VERSION)_$(FILE_ARCH) '$(HOME)/bin/$(FILE_COMMAND)'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Then, make sure `terragrunt-atlantis-config` is present on your Atlantis server.

```hcl
variable "terragrunt_atlantis_config_version" {
default = "1.5.0"
default = "1.5.1"
}
build {
Expand Down Expand Up @@ -168,7 +168,7 @@ You can install this tool locally to checkout what kinds of config it will gener
Recommended: Install any version via go get:

```bash
cd && GO111MODULE=on go get github.com/transcend-io/terragrunt-atlantis-config@v1.5.0 && cd -
cd && GO111MODULE=on go get github.com/transcend-io/terragrunt-atlantis-config@v1.5.1 && cd -
```

This module officially supports golang versions v1.13, v1.14, v1.15, and v1.16, tested on CircleCI with each build
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "github.com/transcend-io/terragrunt-atlantis-config/cmd"
// This variable is set at build time using -ldflags parameters.
// But we still set a default here for those using plain `go get` downloads
// For more info, see: http://stackoverflow.com/a/11355611/483528
var VERSION string = "1.5.0"
var VERSION string = "1.5.1"

func main() {
cmd.Execute(VERSION)
Expand Down

0 comments on commit bb10365

Please sign in to comment.