ipn/store/awsstore: add "ts_omit_aws" build tag to reduce binary size

Drops tailscaled from 23M to 21M.

Change-Id: I731c542d03113ac94abb695e3c8fcacbc5542712
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/5171/merge
Brad Fitzpatrick 2 years ago committed by Brad Fitzpatrick
parent e6e1976c3a
commit 97b8c4fa1b

@ -28,6 +28,11 @@ jobs:
- name: Basic build - name: Basic build
run: go build ./cmd/... run: go build ./cmd/...
- name: Build variants
run: |
go install --tags=ts_include_cli ./cmd/tailscaled
go install --tags=ts_omit_aws ./cmd/tailscaled
- name: Get QEMU - name: Get QEMU
run: | run: |
# The qemu in Ubuntu 20.04 (Focal) is too old; we need 5.x something # The qemu in Ubuntu 20.04 (Focal) is too old; we need 5.x something

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build linux //go:build linux && !ts_omit_aws
// +build linux // +build linux,!ts_omit_aws
// Package awsstore contains an ipn.StateStore implementation using AWS SSM. // Package awsstore contains an ipn.StateStore implementation using AWS SSM.
package awsstore package awsstore

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build !linux //go:build !linux || ts_omit_aws
// +build !linux // +build !linux ts_omit_aws
package awsstore package awsstore
@ -12,8 +12,9 @@ import (
"runtime" "runtime"
"tailscale.com/ipn" "tailscale.com/ipn"
"tailscale.com/types/logger"
) )
func NewStore(string) (ipn.StateStore, error) { func New(logger.Logf, string) (ipn.StateStore, error) {
return nil, fmt.Errorf("AWS store is not supported on %v", runtime.GOOS) return nil, fmt.Errorf("AWS store is not supported on %v", runtime.GOOS)
} }

Loading…
Cancel
Save