Skip to content

packit: set default for GOPROXY #86

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ srpm_build_deps:
actions:
# v1 just the default prior to having tags
get-current-version: bash -c "make show-version"
post-upstream-clone: bash -c "GOPROXY=https://proxy.golang.org,direct go mod vendor && ./tools/rpm_spec_add_provides_bundle.sh"
post-upstream-clone: bash -c "make GOPROXY='https://proxy.golang.org,direct' patch-spec-in-place"
create-archive: bash -c "make release_artifacts"

# Handle only releases without a "dot" (e.g. v88.2), since "dot" releases should never be released to Fedora
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,22 @@ clean: ## Remove all built binaries
# ./rpmbuild, using rpmbuild's usual directory structure.
#

RPM_SPECFILE=rpmbuild/SPECS/image-builder.spec
RPM_SPECFILE_NAME=image-builder.spec
RPM_SPECFILE=rpmbuild/SPECS/$(RPM_SPECFILE_NAME)
RPM_TARBALL=rpmbuild/SOURCES/$(PACKAGE_NAME_COMMIT).tar.gz
RPM_TARBALL_VERSIONED=rpmbuild/SOURCES/$(PACKAGE_NAME_VERSION).tar.gz

.PHONY: $(RPM_SPECFILE)
$(RPM_SPECFILE):
mkdir -p $(CURDIR)/rpmbuild/SPECS
git show HEAD:image-builder.spec > $(RPM_SPECFILE)
git show HEAD:$(RPM_SPECFILE_NAME) > $(RPM_SPECFILE)
go mod vendor
./tools/rpm_spec_add_provides_bundle.sh $(RPM_SPECFILE)

.PHONY: patch-spec-in-place
patch-spec-in-place: $(RPM_SPECFILE) ## patch image-builder.spec in-place for build systems
cp $< $(RPM_SPECFILE_NAME)

# This is the syntax to essentially get
# either PACKAGE_NAME_COMMIT or PACKAGE_NAME_VERSION dynamically
define get_package_name
Expand Down
Loading