Skip to content

Commit 6c4fb54

Browse files
require go1.18. put Makefile in line with my other projects
1 parent d4de13c commit 6c4fb54

File tree

5 files changed

+31
-49
lines changed

5 files changed

+31
-49
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ ddayconfig.yml
33
!docs/ddayconfig.yml
44
doomsday-darwin-amd64
55
doomsday-darwin-arm64
6+
doomsday-darwin
67
doomsday-linux
8+
doomsday-linux-amd64
79
!client/doomsday
810
node_modules

Makefile

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,39 @@
11
BUILD_TARGET ?= cmd/*.go
22
APP_NAME := doomsday
33
OUTPUT_NAME ?= $(APP_NAME)
4-
SHELL := /bin/bash
4+
SHELL := $(shell which bash)
55
COMMIT_HASH := $(shell git log --pretty='format:%h' -n 1)
66
DIRTY_LINE := $(shell git diff --shortstat 2> /dev/null | tail -n1)
77
ifneq ("$(DIRTY_LINE)", "")
88
DIRTY := +
99
endif
1010
VERSION ?= development
11-
LOCAL_GOOS=$(shell go env GOOS)
12-
LOCAL_GOARCH=$(shell go env GOARCH)
13-
LDFLAGS := -X "github.com/doomsday-project/doomsday/version.Version=$(VERSION)-$(COMMIT_HASH)$(DIRTY)"
11+
LDFLAGS := -X "main.Version=$(VERSION)-$(COMMIT_HASH)$(DIRTY)"
1412
BUILD := go build -v -ldflags='$(LDFLAGS)' -o $(OUTPUT_NAME) $(BUILD_TARGET)
1513

16-
.PHONY: build darwin darwin-amd64 darwin-arm64 linux all clean embed server tsc
14+
.PHONY: build server darwin darwin-amd64 darwin-arm64 linux linux-amd64 embed tsc all clean
1715
.DEFAULT: build
1816

19-
20-
#: Generic server build for all platfomrs
2117
build: embed server
2218

23-
server:
19+
server:
2420
@echo $(VERSION)-$(COMMIT_HASH)$(DIRTY)
25-
GOOS=$(GOOS) GOARCH=$(GOARCH) $(BUILD)
21+
GOOS=$(GOOS) GOARCH=$(GOARCH) VERSION=$(VERSION) $(BUILD)
2622

27-
#: Builds all OSX executable
2823
darwin: darwin-amd64 darwin-arm64
2924

30-
#: Builds arm64 OSX executable
25+
darwin-amd64:
26+
GOOS=darwin GOARCH=amd64 OUTPUT_NAME=$(APP_NAME)-darwin-amd64 $(MAKE) server
27+
3128
darwin-arm64:
32-
GOOS=darwin GOARCH=arm64 OUTPUT_NAME=$(APP_NAME)-darwin-arm64 VERSION="$(VERSION)" $(MAKE) server
29+
GOOS=darwin GOARCH=arm64 OUTPUT_NAME=$(APP_NAME)-darwin-arm64 $(MAKE) server
3330

34-
#: Builds amd64 OSX executable
35-
darwin-amd64:
36-
GOOS=darwin GOARCH=amd64 OUTPUT_NAME=$(APP_NAME)-darwin-amd64 VERSION="$(VERSION)" $(MAKE) server
31+
linux: linux-amd64
3732

38-
#: Builds amd64 linux executable
39-
linux:
40-
GOOS=linux GOARCH=amd64 OUTPUT_NAME=$(APP_NAME)-linux VERSION="$(VERSION)" $(MAKE) server
33+
linux-amd64:
34+
GOOS=linux GOARCH=amd64 OUTPUT_NAME=$(APP_NAME)-linux-amd64 $(MAKE) server
4135

42-
#: Build client and server doomsday components
43-
all: embed darwin linux server
36+
all: embed darwin linux
4437

4538
embed: tsc
4639
GOOS="" GOARCH="" go run web/embed/main.go web/embed/mappings.yml
@@ -50,4 +43,4 @@ tsc:
5043
tsc --project web/tsconfig.json
5144

5245
clean:
53-
rm -f $(APP_NAME) $(APP_NAME)-darwin-* $(APP_NAME)-linux
46+
rm -f $(APP_NAME) $(APP_NAME)-darwin-amd64 $(APP_NAME)-darwin-arm64 $(APP_NAME)-linux-amd64

go.mod

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
module github.com/doomsday-project/doomsday
22

3-
go 1.13
3+
go 1.18
44

55
require (
66
code.cloudfoundry.org/credhub-cli v0.0.0-20191230184144-6e537b521d9d
7-
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
8-
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
97
github.com/cloudfoundry-community/vaultkv v0.1.1
108
github.com/gorilla/mux v1.7.3
119
github.com/olekukonko/tablewriter v0.0.4
@@ -14,7 +12,19 @@ require (
1412
github.com/starkandwayne/goutils v0.0.0-20190115202530-896b8a6904be
1513
github.com/thomasmitchell/go-shout v0.0.0-20200117221442-ad6c1a8d1669
1614
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
17-
golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 // indirect
1815
gopkg.in/alecthomas/kingpin.v2 v2.2.6
1916
gopkg.in/yaml.v2 v2.3.0
2017
)
18+
19+
require (
20+
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
21+
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
22+
github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e // indirect
23+
github.com/cloudfoundry/socks5-proxy v0.2.0 // indirect
24+
github.com/google/uuid v1.0.0 // indirect
25+
github.com/hashicorp/go-version v0.0.0-20171129150820-4fe82ae3040f // indirect
26+
github.com/mattn/go-isatty v0.0.3 // indirect
27+
github.com/mattn/go-runewidth v0.0.7 // indirect
28+
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 // indirect
29+
golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 // indirect
30+
)

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0
3333
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
3434
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
3535
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
36-
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
3736
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
3837
github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=
3938
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=

web/package-lock.json

Lines changed: 1 addition & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)