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

build: run 'make generate' in release container #4934

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 4 additions & 14 deletions Makefile
Expand Up @@ -168,16 +168,6 @@ clean: wasm-lib-clean
fuzz:
go test ./ast -fuzz FuzzParseStatementsAndCompileModules -fuzztime ${FUZZ_TIME} -v -run '^$$'

.PHONY: update-builtin-metadata-release
update-builtin-metadata-release:
build/update-version.sh "$(VERSION)"
make generate

.PHONY: update-builtin-metadata-dev
update-builtin-metadata-dev:
build/update-version.sh "$(VERSION)-dev"
make generate

######################################################
#
# Documentation targets
Expand Down Expand Up @@ -488,22 +478,22 @@ check-go-module:
######################################################

.PHONY: release-patch
release-patch: update-builtin-metadata-release
release-patch:
ifeq ($(GITHUB_TOKEN),)
@echo "\033[0;31mGITHUB_TOKEN environment variable missing.\033[33m Provide a GitHub Personal Access Token (PAT) with the 'read:org' scope.\033[0m"
endif
@$(DOCKER) run $(DOCKER_FLAGS) \
-e GITHUB_TOKEN=$(GITHUB_TOKEN) \
-e LAST_VERSION=$(LAST_VERSION) \
-v $(PWD):/_src \
python:2.7 \
cmd.cat/make/git/go/python2/perl \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I'll admit that I'm not proud of this. But I really kind of dislike having to manage building and tagging and pushing images for these maintenance jobs.

Ideally, we'd be using apko here, I think; but it's macos story is a bit annoying (lima); which we wouldn't have to worry about much if kontain.me just worked on it, but it kind of doesn't...

/_src/build/gen-release-patch.sh --version=$(VERSION) --source-url=/_src

.PHONY: dev-patch
dev-patch: update-builtin-metadata-dev
dev-patch:
@$(DOCKER) run $(DOCKER_FLAGS) \
-v $(PWD):/_src \
python:2.7 \
cmd.cat/make/git/go/python2/perl \
/_src/build/gen-dev-patch.sh --version=$(VERSION) --source-url=/_src

# Deprecated targets. To be removed.
Expand Down
2 changes: 1 addition & 1 deletion build/gen-release-patch.sh
Expand Up @@ -77,7 +77,7 @@ update_capabilities() {
}

update_metadata() {
cp $SOURCE_URL/builtin_metadata.json $OPA_DIR
make generate
git add --intent-to-add builtin_metadata.json
}

Expand Down