Skip to content

Commit

Permalink
Inject license ca during build
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 23, 2024
1 parent 3ee3a9a commit 8121902
Show file tree
Hide file tree
Showing 24 changed files with 9,760 additions and 5 deletions.
1 change: 1 addition & 0 deletions cmd/ace/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main

import (
"go.bytebuilders.dev/ace/pkg/cmds"
_ "go.bytebuilders.dev/license-verifier/info"

"gomodules.xyz/logs"
"k8s.io/klog/v2"
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/rs/xid v1.6.0
github.com/spf13/cobra v1.8.1
go.bytebuilders.dev/client v0.0.5-0.20241016221800-418b6e9b556d
go.bytebuilders.dev/license-verifier v0.14.3
go.bytebuilders.dev/resource-model v0.1.0
gocloud.dev v0.36.0
gomodules.xyz/blobfs v0.1.14
Expand Down Expand Up @@ -41,6 +42,7 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/PuerkitoBio/purell v1.2.1 // indirect
github.com/aws/aws-sdk-go v1.54.15 // indirect
github.com/aws/aws-sdk-go-v2 v1.24.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect
Expand Down Expand Up @@ -170,7 +172,7 @@ require (
k8s.io/apimachinery v0.30.2 // indirect
k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2 // indirect
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
kmodules.xyz/client-go v0.30.29 // indirect
kmodules.xyz/client-go v0.30.30 // indirect
kmodules.xyz/go-containerregistry v0.0.12 // indirect
kmodules.xyz/offshoot-api v0.30.1 // indirect
kmodules.xyz/resource-metrics v0.30.4 // indirect
Expand Down
8 changes: 6 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lpr
github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA=
github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/PuerkitoBio/purell v1.2.1 h1:QsZ4TjvwiMpat6gBCBxEQI0rcS9ehtkKtSpiUnd9N28=
github.com/PuerkitoBio/purell v1.2.1/go.mod h1:ZwHcC/82TOaovDi//J/804umJFFmbOHPngi8iYYv/Eo=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
Expand Down Expand Up @@ -488,6 +490,8 @@ github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.bytebuilders.dev/client v0.0.5-0.20241016221800-418b6e9b556d h1:2SAhQf7tHPMFsuaxFc685WmX6wVD/G/42UKKZZsV5gA=
go.bytebuilders.dev/client v0.0.5-0.20241016221800-418b6e9b556d/go.mod h1:+0t22OhVokx/de9yXhST6JEghWT320R4aa2HoeV4lt0=
go.bytebuilders.dev/license-verifier v0.14.3 h1:5BTwmFEgCjSlAs2Nzh3/7+u//VoF93xjqywrJiqmZsg=
go.bytebuilders.dev/license-verifier v0.14.3/go.mod h1:bNNaVbry3TZbu54pf57LkhjsFX94T6O62w0roiy1yiE=
go.bytebuilders.dev/resource-model v0.1.0 h1:ES4ygNqmKt+dyAi/tFM0oHcqiHqqnZbafxHWPohVcQc=
go.bytebuilders.dev/resource-model v0.1.0/go.mod h1:/uMIfxqPIrDmiYWA28OW3xzogijxpwkicR4kK7jam9g=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
Expand Down Expand Up @@ -776,8 +780,8 @@ k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2 h1:T5TEV4a+pEjc+j9Xui3MGG
k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kmodules.xyz/client-go v0.30.29 h1:qiJH6inZNrjXKearnzacZZtch2sUxSWJMKntdwFUYC8=
kmodules.xyz/client-go v0.30.29/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM=
kmodules.xyz/client-go v0.30.30 h1:kuRC/d02vEbGe5YML1l+KCbMZXt1pmx0Am8dlI4lQlc=
kmodules.xyz/client-go v0.30.30/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM=
kmodules.xyz/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3qmAFIE37I=
kmodules.xyz/go-containerregistry v0.0.12/go.mod h1:KgeNg0hDsgeda+qc0NzWk0iVRdF0+ZIg/oRzGoYh78I=
kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI=
Expand Down
12 changes: 12 additions & 0 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ export GOOS="${OS}"
export GO111MODULE=on
export GOFLAGS="-mod=vendor"

ENFORCE_LICENSE=${ENFORCE_LICENSE:-}
if [ ! -z "${git_tag:-}" ]; then
ENFORCE_LICENSE=true
fi
if [ "$ENFORCE_LICENSE" != "true" ]; then
ENFORCE_LICENSE=false
fi

go install \
-installsuffix "static" \
-ldflags " \
Expand All @@ -47,5 +55,9 @@ go install \
-X main.GoVersion=$(go version | cut -d " " -f 3) \
-X main.Compiler=$(go env CC) \
-X main.Platform=${OS}/${ARCH} \
-X 'go.bytebuilders.dev/license-verifier/info.EnforceLicense=${ENFORCE_LICENSE}' \
-X 'go.bytebuilders.dev/license-verifier/info.LicenseCA=$(curl -fsSL https://licenses.appscode.com/certificates/ca.crt)' \
-X 'go.bytebuilders.dev/license-verifier/info.ProductOwnerName=${PRODUCT_OWNER_NAME}' \
-X 'go.bytebuilders.dev/license-verifier/info.ProductName=${PRODUCT_NAME}' \
" \
./...
5 changes: 5 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

188 changes: 188 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8121902

Please sign in to comment.