Skip to content

Instantly share code, notes, and snippets.

@gomex
Created February 8, 2021 18:04
Show Gist options
  • Save gomex/85c0e4de87540e7f6b02498a5a013021 to your computer and use it in GitHub Desktop.
Save gomex/85c0e4de87540e7f6b02498a5a013021 to your computer and use it in GitHub Desktop.
cnf ?= .env.aws
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# Get the latest tag
TAG=$(shell git describe --tags --abbrev=0)
GIT_COMMIT=$(shell git log -1 --format=%h)
AWS_ACCOUNT=42424242424242
TERRAFORM_VERSION=0.12.28
# HELP
# This will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
build: ## Build Artifact image
docker build -t image:$(GIT_COMMIT) .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment