Skip to content

Commit

Permalink
Update to go 1.19 and add ldflags to build (#7)
Browse files Browse the repository at this point in the history
* Update to go 1.19 and add ldflags to build

* Fix archives in goreleaser conf
  • Loading branch information
akajla09 authored Jan 15, 2023
1 parent 330d520 commit dad4bc3
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 443 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v3
with:
go-version: "^1.14.3"
go-version: "^1.19.3"
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v3
with:
go-version: "^1.14.3"
go-version: "^1.19.3"
- name: Docker login
uses: docker/login-action@v2
with:
Expand Down
14 changes: 8 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ builds:
goarch:
- amd64
- arm64
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
checksum:
name_template: 'checksums.txt'
changelog:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dev: clean
.PHONY: build
build: clean
$(GOCMD) get
$(GOENV) $(GOBUILD) $(BUILD_PATH) main.go
$(GOENV) $(GOBUILD) $(BUILD_PATH) -ldflags="-s -w" main.go

.PHONY: docker
docker:
Expand Down
30 changes: 27 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
module github.com/warrant-dev/edge

go 1.14
go 1.19

require (
github.com/go-playground/validator/v10 v10.11.0
github.com/go-redis/redis v6.15.9+incompatible
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/r3labs/sse v0.0.0-20210224172625-26fe804710bc
github.com/spf13/cobra-cli v1.3.0 // indirect
github.com/spf13/viper v1.12.0
gopkg.in/cenkalti/backoff.v1 v1.1.0
)

require (
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.18.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
Loading

0 comments on commit dad4bc3

Please sign in to comment.