Skip to content

Commit 2582ffa

Browse files
committed
Update tags everywhere
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
1 parent c6e8067 commit 2582ffa

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

.goreleaser.yml

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ builds:
2020
- -mod=readonly
2121
ldflags:
2222
- -s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=v{{.Version}}
23+
tags:
24+
- ts2019
2325

2426
- id: darwin-arm64
2527
main: ./cmd/headscale/headscale.go
@@ -34,6 +36,8 @@ builds:
3436
- -mod=readonly
3537
ldflags:
3638
- -s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=v{{.Version}}
39+
tags:
40+
- ts2019
3741

3842
- id: linux-amd64
3943
mod_timestamp: "{{ .CommitTimestamp }}"
@@ -46,6 +50,8 @@ builds:
4650
main: ./cmd/headscale/headscale.go
4751
ldflags:
4852
- -s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=v{{.Version}}
53+
tags:
54+
- ts2019
4955

5056
- id: linux-arm64
5157
mod_timestamp: "{{ .CommitTimestamp }}"
@@ -58,6 +64,8 @@ builds:
5864
main: ./cmd/headscale/headscale.go
5965
ldflags:
6066
- -s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=v{{.Version}}
67+
tags:
68+
- ts2019
6169

6270
archives:
6371
- id: golang-cross

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN go mod download
99

1010
COPY . .
1111

12-
RUN CGO_ENABLED=0 GOOS=linux go install -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=$VERSION" -a ./cmd/headscale
12+
RUN CGO_ENABLED=0 GOOS=linux go install -tags ts2019 -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=$VERSION" -a ./cmd/headscale
1313
RUN strip /go/bin/headscale
1414
RUN test -e /go/bin/headscale
1515

Dockerfile.debug

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN go mod download
99

1010
COPY . .
1111

12-
RUN CGO_ENABLED=0 GOOS=linux go install -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=$VERSION" -a ./cmd/headscale
12+
RUN CGO_ENABLED=0 GOOS=linux go install -tags ts2019 -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=$VERSION" -a ./cmd/headscale
1313
RUN test -e /go/bin/headscale
1414

1515
# Debug image

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ifeq ($(filter $(GOOS), openbsd netbsd soloaris plan9), )
1010
else
1111
endif
1212

13-
TAGS = -tags "ts2019"
13+
TAGS = -tags ts2019
1414

1515
# GO_SOURCES = $(wildcard *.go)
1616
# PROTO_SOURCES = $(wildcard **/*.proto)
@@ -66,7 +66,7 @@ test_integration_v2_general:
6666
-v $$PWD:$$PWD -w $$PWD/integration \
6767
-v /var/run/docker.sock:/var/run/docker.sock \
6868
golang:1 \
69-
go test $(TAGS) ./... -timeout 60m -parallel 6
69+
go test $(TAGS) -failfast ./... -timeout 60m -parallel 6
7070

7171
coverprofile_func:
7272
go tool cover -func=coverage.out

app.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,8 @@ func (h *Headscale) createRouter(grpcMux *runtime.ServeMux) *mux.Router {
454454
router.HandleFunc("/health", h.HealthHandler).Methods(http.MethodGet)
455455
router.HandleFunc("/key", h.KeyHandler).Methods(http.MethodGet)
456456
router.HandleFunc("/register/{nkey}", h.RegisterWebAPI).Methods(http.MethodGet)
457+
h.addLegacyHandlers(router)
458+
457459
router.HandleFunc("/oidc/register/{nkey}", h.RegisterOIDC).Methods(http.MethodGet)
458460
router.HandleFunc("/oidc/callback", h.OIDCCallback).Methods(http.MethodGet)
459461
router.HandleFunc("/apple", h.AppleConfigMessage).Methods(http.MethodGet)
@@ -466,8 +468,6 @@ func (h *Headscale) createRouter(grpcMux *runtime.ServeMux) *mux.Router {
466468
router.HandleFunc("/swagger/v1/openapiv2.json", SwaggerAPIv1).
467469
Methods(http.MethodGet)
468470

469-
h.addLegacyHandlers(router)
470-
471471
if h.cfg.DERP.ServerEnabled {
472472
router.HandleFunc("/derp", h.DERPHandler)
473473
router.HandleFunc("/derp/probe", h.DERPProbeHandler)

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
buildInputs = devDeps;
138138

139139
shellHook = ''
140-
export GOFLAGS=-tags="integration,integration_general,integration_oidc,integration_cli,integration_derp"
140+
export GOFLAGS=-tags="ts2019"
141141
'';
142142
};
143143

0 commit comments

Comments
 (0)