Skip to content

Commit

Permalink
fixes in release script
Browse files Browse the repository at this point in the history
  • Loading branch information
balopat committed Nov 1, 2019
1 parent 45cc3cc commit 5ab11c6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ $(BUILD_DIR)/$(PROJECT): $(BUILD_DIR)/$(PROJECT)-$(GOOS)-$(GOARCH)
$(BUILD_DIR)/$(PROJECT)-$(GOOS)-$(GOARCH): generate-licenses $(GO_FILES) $(BUILD_DIR)
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=1 go build -tags $(GO_BUILD_TAGS_$(GOOS)) -ldflags $(GO_LDFLAGS_$(GOOS)) -gcflags $(GO_GCFLAGS) -asmflags $(GO_ASMFLAGS) -o $@ $(BUILD_PACKAGE)

$(BUILD_DIR)/$(PROJECT)-%-$(GOARCH): $(GO_FILES) $(BUILD_DIR)
$(BUILD_DIR)/$(PROJECT)-%-$(GOARCH): generate-licenses $(GO_FILES) $(BUILD_DIR)
docker build --build-arg PROJECT=$(REPOPATH) \
--build-arg TARGETS=$*/$(GOARCH) \
--build-arg FLAG_LDFLAGS=$(GO_LDFLAGS_$(*)) \
Expand All @@ -96,7 +96,7 @@ $(BUILD_DIR):
.PRECIOUS: $(foreach platform, $(SUPPORTED_PLATFORMS), $(BUILD_DIR)/$(PROJECT)-$(platform))

.PHONY: cross
cross: generate-licenses $(foreach platform, $(SUPPORTED_PLATFORMS), $(BUILD_DIR)/$(PROJECT)-$(platform).sha256)
cross: $(foreach platform, $(SUPPORTED_PLATFORMS), $(BUILD_DIR)/$(PROJECT)-$(platform).sha256)

.PHONY: test
test: $(BUILD_DIR)
Expand Down
3 changes: 3 additions & 0 deletions cmd/skaffold/app/cmd/credits_dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ package cmd
import (
"errors"
"io"

//required for rakyll/statik embedded content
_ "github.com/rakyll/statik/fs"
)

// exportCredits with !release build tag is just here for compilation purposes
Expand Down
2 changes: 1 addition & 1 deletion hack/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ go 1.12
require (
github.com/corneliusweig/release-notes v0.0.0-20191014214505-0be5c7c66752
github.com/google/licenseclassifier v0.0.0-20190926221455-842c0d70d702 // indirect
github.com/google/trillian v1.3.2-0.20191028154214-c93851d711b5
github.com/google/trillian v1.3.2-0.20191031155000-9600d042b2e7
github.com/rakyll/statik v0.1.6
)
2 changes: 2 additions & 0 deletions hack/tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI
github.com/google/trillian v1.2.2-0.20190612132142-05461f4df60a/go.mod h1:YPmUVn5NGwgnDUgqlVyFGMTgaWlnSvH7W5p+NdOG8UA=
github.com/google/trillian v1.3.2-0.20191028154214-c93851d711b5 h1:XjcMiq0QsXctpc3C41vsIhSlvfpOdbgDbrZYiOA63YI=
github.com/google/trillian v1.3.2-0.20191028154214-c93851d711b5/go.mod h1:RUI4FE6YwFEDDGAgCAIdCrU2hpyGUGubgm9K3kqvJAA=
github.com/google/trillian v1.3.2-0.20191031155000-9600d042b2e7 h1:rpYDS9D8rXDKiQE8QvGxYlNTQgheReIE3e0U2aOfUKM=
github.com/google/trillian v1.3.2-0.20191031155000-9600d042b2e7/go.mod h1:RUI4FE6YwFEDDGAgCAIdCrU2hpyGUGubgm9K3kqvJAA=
github.com/google/trillian-examples v0.0.0-20190603134952-4e75ba15216c/go.mod h1:WgL3XZ3pA8/9cm7yxqWrZE6iZkESB2ItGxy5Fo6k2lk=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
Expand Down
18 changes: 16 additions & 2 deletions hack/tools/vendor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,26 @@
## This tool should only be used when the hack/tools/vendor directory needs update
## Why are we using this instead of go mod vendor? Because https://github.com/golang/go/issues/32502
## What files do we need?
## vendor/github.com/google/licenseclassifier/licenses - it contains no go files, hence it's not part of it
## vendor/github.com/google/trillian/scripts/licenses - it has no go.mod for it

cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1
export GOFLAGS=""
DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)"
cd ${DIR}
go mod vendor

git clone https://github.com/google/licenseclassifier
cd licenseclassifier
git checkout 842c0d70d702
cd ${DIR}
cp -R licenseclassifier/licenses vendor/github.com/google/licenseclassifier/
rm -rf licenseclassifier

git clone https://github.com/google/trillian
cd trillian
git checkout 9600d042b2e7
mkdir -p vendor/github.com/google/trillian/scripts/
cd ${DIR}
cp -R trillian/scripts/licenses vendor/github.com/google/trillian/scripts/
rm -rf trillian


2 changes: 1 addition & 1 deletion hack/tools/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ github.com/google/licenseclassifier/stringclassifier
github.com/google/licenseclassifier/stringclassifier/internal/pq
github.com/google/licenseclassifier/stringclassifier/searchset
github.com/google/licenseclassifier/stringclassifier/searchset/tokenizer
# github.com/google/trillian v1.3.2-0.20191028154214-c93851d711b5
# github.com/google/trillian v1.3.2-0.20191031155000-9600d042b2e7
github.com/google/trillian/scripts/licenses
github.com/google/trillian/scripts/licenses/licenses
# github.com/inconshreveable/mousetrap v1.0.0
Expand Down

0 comments on commit 5ab11c6

Please sign in to comment.