Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman committed Jan 25, 2024
1 parent abfe9be commit 8fe14aa
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions modules/readme/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@ export README_FILE ?= README.md
export README_YAML ?= README.yaml

export README_TEMPLATE_REPO_REMOTE_NAME ?= origin
export README_TEMPLATE_REPO_ORG ?= $(lastword $(subst :, ,$(subst /,,$(dir $(shell git remote get-url $(README_TEMPLATE_REPO_REMOTE_NAME))))))
#export README_TEMPLATE_REPO_REMOTE ?= $(shell git remote get-url $(README_TEMPLATE_REPO_REMOTE_NAME))
export README_TEMPLATE_REPO_REMOTE ?= https://github.com/cloudposse/build-harness
export README_TEMPLATE_REPO_REMOTE ?= [email protected]:cloudposse/build-harness.git

# Parse https://github.com/...
ifneq (,$(findstring https://,$(README_TEMPLATE_REPO_REMOTE)))
export README_TEMPLATE_REPO_ORG ?= $(shell basename $(shell dirname $(README_TEMPLATE_REPO_REMOTE)))
endif

# Parse [email protected]
ifneq (,$(findstring [email protected],$(README_TEMPLATE_REPO_REMOTE)))
export README_TEMPLATE_REPO_ORG ?= $(lastword $(subst :, ,$(subst /,,$(dir $(README_TEMPLATE_REPO_REMOTE)))))
endif

export README_TEMPLATE_REPO ?= .github
export README_TEMPLATE_REPO_REF ?= blob/main
export README_TEMPLATE_REPO_PATH ?= README.md.gotmpl
Expand All @@ -14,9 +27,8 @@ export README_INCLUDES ?= $(file://$(shell pwd)/?type=text/plain)

# Create the README.md.gotmpl, if none exists by fetching it from the organization's `.github` repository
$(README_TEMPLATE_FILE):
git remote get-url $(README_TEMPLATE_REPO_REMOTE_NAME) 1>&2
echo GitHub Org: $(README_TEMPLATE_REPO_ORG) 1>&2
echo curl -o $@ -fsSL '$(README_TEMPLATE_REPO_URL)'
@echo GitHub Org: $(README_TEMPLATE_REPO_ORG)
curl -o $@ -fsSL '$(README_TEMPLATE_REPO_URL)'

## Alias for readme/build
readme: readme/build
Expand Down

0 comments on commit 8fe14aa

Please sign in to comment.