Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Run 'dep init' to create Gopkg.{toml,lock} #6

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ INTERVAL ?= 86400
build_cmd = mkdir -p _output && GOOS=linux go build -o _output/$(1) ./cmd/$(1)
prepare_spec = sed 's,DOCKER_IMAGE,$(DOCKER_REPO),g'

SHELL := /bin/bash

build:
$(call build_cmd,collapsed-kube-commit-mapper)
$(call build_cmd,publishing-bot)
Expand All @@ -35,8 +37,9 @@ update-deps:
.PHONY: update-deps

init-deploy:
$(KUBECTL) delete -n "$(NAMESPACE)" rc publisher || true
$(KUBECTL) delete -n "$(NAMESPACE)" pod publisher || true
$(KUBECTL) delete -n "$(NAMESPACE)" --ignore-not-found=true rc publisher
$(KUBECTL) delete -n "$(NAMESPACE)" --ignore-not-found=true pod publisher
while $(KUBECTL) get pod publisher -a &>/dev/null; do echo -n .; sleep 1; done
$(KUBECTL) apply -n "$(NAMESPACE)" -f artifacts/manifests/storage-class.yaml || true
$(KUBECTL) get StorageClass ssd
sed 's/TOKEN/$(shell echo "$(TOKEN)" | base64 | tr -d '\n')/g' artifacts/manifests/secret.yaml | $(KUBECTL) apply -n "$(NAMESPACE)" -f -
Expand Down
2 changes: 1 addition & 1 deletion artifacts/scripts/initialize_repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ popd

go get github.com/golang/dep
pushd ${GOPATH}/src/github.com/golang/dep
git checkout 7c44971bbb9f0ed87db40b601f2d9fe4dffb750d
git checkout 3a59b68597c76c889b2ff2854b30bc29e902b555
go install ./cmd/dep
popd

Expand Down
11 changes: 11 additions & 0 deletions artifacts/scripts/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,17 @@ function fix-godeps() {
fi
fi

# run golang dep
echo "Running dep init."
rm -rf vendor/
dep init -gopath
git add Gopkg.{toml,lock}
if ! git diff-index --quiet --cached HEAD -- ; then
git commit -q -m "sync: run golang/dep"
fi
rm -rf vendor/
git reset --hard

# amend godep commit to ${dst_old_commit}
if ! git diff --exit-code ${dst_old_commit} &>/dev/null && [ "${squash}" = true ]; then
echo "Amending last merge with godep changes."
Expand Down