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

Allow packages vendor/repo to be configured #251

Open
nabadger opened this issue Oct 22, 2020 · 1 comment
Open

Allow packages vendor/repo to be configured #251

nabadger opened this issue Oct 22, 2020 · 1 comment

Comments

@nabadger
Copy link

Describe the Feature

Could the packages/install target work with custom git repos?

Use Case

I was playing with idea of having a fork of https://github.com/cloudposse/packages.

In general I like the idea of submitting PR's back to this repo, but wondering if these will get a bit too specific to my own use-cases. For now I've got my own fork that I would like to use with build-harness to install packages for my project needs.

Describe Ideal Solution

Would love to set an variable in the top-level build-harnessMakefile that could control this:

export PACKAGES_VERSION = master
export PACKAGES_VENDOR ?= cloudposse
export PACKAGES_REPO ?= packages.git

Then in the modules/packages/install

## Install packages 
packages/install:
	@if [ ! -d $(PACKAGES_PATH) ]; then \
	  echo "Installing packages ref=$(PACKAGES_VERSION)..."; \
	  rm -rf $(PACKAGES_PATH); \
	  $(GIT) clone -c advice.detachedHead=false --depth=1 -b $(PACKAGES_VERSION) https://github.com/$(PACKAGES_VENDOR)/$(PACKAGES_REPO) $(PACKAGES_PATH); \
	  rm -rf $(PACKAGES_PATH)/.git; \
	fi 

Currently I do this as a module override, but it generates a lot of noise:

... /build-harness-extensions/modules/packages/Makefile:9: warning: overriding recipe for target 'packages/install'
... /build-harness/modules/packages/Makefile:15: warning: ignoring old recipe for target 'packages/install'

Questions

1 - Is there any way to avoid printing out those warnings when overriding recipes?
2 - Would you accept a PR for making package-vendor/repo configurable?

@github-actions
Copy link

Thank you for reporting the issue! If you haven't already joined our slack community, then we invite you to do so.

This is a great place to get help and ask questions from our AMAZING community.

Slack Community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant