Skip to content

Commit 594242b

Browse files
committed
Mirrors packer-plugin-amazon, the hard way
1 parent b8a1e7b commit 594242b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/dependabot_hack.yml

+2
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ jobs:
2323
# Keep these sorted alphabetically by <user>/<repo>, separated by an empty line
2424

2525
- uses: gruntwork-io/terragrunt@v0.55.10
26+
27+
- uses: hashicorp/packer-plugin-amazon@v1.2.9

Makefile

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export TERRAFORM_VERSION_REPO_PATH ?= $(REPO_DIR)/terraform/$(TERRAFORM_VERSION)
1111
export TERRAGRUNT_VERSION ?= v$(call match_pattern_in_file,$(MIRROR_GITHUB_TOOLS),'gruntwork-io/terragrunt','$(SEMVER_PATTERN)')
1212
export TERRAGRUNT_VERSION_REPO_PATH ?= $(REPO_DIR)/terragrunt/$(TERRAGRUNT_VERSION)
1313

14+
export PACKER_PLUGIN_AMAZON_VERSION ?= v$(call match_pattern_in_file,$(MIRROR_GITHUB_TOOLS),'hashicorp/packer-plugin-amazon','$(SEMVER_PATTERN)')
15+
export PACKER_PLUGIN_AMAZON_VERSION_REPO_PATH ?= $(REPO_DIR)/packer-plugins/amazon/$(PACKER_PLUGIN_AMAZON_VERSION)
16+
1417
$(REPO_DIR)/%:
1518
@ echo "[make]: Creating directory '$@'..."
1619
mkdir -p $@
@@ -19,6 +22,11 @@ packer/download: | $(PACKER_VERSION_REPO_PATH) guard/program/jq
1922
@ echo "[$@]: Downloading $(@D) $(PACKER_VERSION)..."
2023
$(call download_hashicorp_release,$(PACKER_VERSION_REPO_PATH)/$(@D)_$(PACKER_VERSION)_$(OS)_$(ARCH).zip,$(@D),$(PACKER_VERSION))
2124

25+
packer-plugin-amazon/download: PLUGIN_FILENAME = $(shell basename $(shell $(call parse_github_download_url,hashicorp,$(@D),tags/$(PACKER_PLUGIN_AMAZON_VERSION),(.name | contains("$(OS)_$(ARCH)")))))
26+
packer-plugin-amazon/download: | $(PACKER_PLUGIN_AMAZON_VERSION_REPO_PATH) guard/program/jq
27+
@ echo "[$@]: Downloading $(@D) $(PACKER_PLUGIN_AMAZON_VERSION)..."
28+
$(call download_github_release,$(PACKER_PLUGIN_AMAZON_VERSION_REPO_PATH)/$(PLUGIN_FILENAME),hashicorp,$(@D),tags/$(PACKER_PLUGIN_AMAZON_VERSION),(.name | contains("$(OS)_$(ARCH)")))
29+
2230
terraform/download: | $(TERRAFORM_VERSION_REPO_PATH) guard/program/jq
2331
@ echo "[$@]: Downloading $(@D) $(TERRAFORM_VERSION)..."
2432
$(call download_hashicorp_release,$(TERRAFORM_VERSION_REPO_PATH)/$(@D)_$(TERRAFORM_VERSION)_$(OS)_$(ARCH).zip,$(@D),$(TERRAFORM_VERSION))
@@ -28,4 +36,4 @@ terragrunt/download: | $(TERRAGRUNT_VERSION_REPO_PATH) guard/program/jq
2836
@ echo "[$@]: Downloading $(@D) $(TERRAGRUNT_VERSION)..."
2937
$(call download_github_release,$(TERRAGRUNT_VERSION_REPO_PATH)/$(TERRAGRUNT_FILENAME),gruntwork-io,$(@D),tags/$(TERRAGRUNT_VERSION),(.name | contains("$(OS)_$(ARCH)")))
3038

31-
download-all: packer/download terraform/download terragrunt/download
39+
download-all: packer/download packer-plugin-amazon/download terraform/download terragrunt/download

0 commit comments

Comments
 (0)