Skip to content

Commit

Permalink
fix(Make): let's just simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-colinhutchinson committed Sep 20, 2023
1 parent 3eff62b commit 88697e7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ PROVIDER ?= cloudformation

DOCKER_CMD := $(shell docker buildx version >/dev/null 2>&1 && echo "buildx" || echo "build")


RAW_GIT_REMOTE := $(shell git remote get-url origin)
GIT_REMOTE := $(shell echo $(RAW_GIT_REMOTE) | awk -F'/' '{print $$NF}' | sed 's/\.git$$//')
GIT_ORG := $(shell echo $(RAW_GIT_REMOTE) | awk -F':' '{print $$2}' | awk -F'/' '{print $$1}')


GIT_REPO ?= "aws-test-kitchen"
GIT_ORG ?= "observeinc"

DOCKER_REGISTRY ?= ghcr.io
IMAGE_REPO = $(DOCKER_REGISTRY)/$(GIT_ORG)/$(GIT_REMOTE)
IMAGE_REPO = $(DOCKER_REGISTRY)/$(GIT_ORG)/$(GIT_REPO)
GIT_SHA := $(shell git rev-parse --short HEAD)
IMAGE_TAG ?= $(GIT_SHA)
IMAGE_NAME ?= $(IMAGE_REPO):$(IMAGE_TAG)
Expand Down

0 comments on commit 88697e7

Please sign in to comment.