Skip to content

Commit

Permalink
BBL-81 | standalone makefile repo implementation in place
Browse files Browse the repository at this point in the history
  • Loading branch information
exequielrafaela committed Sep 15, 2020
1 parent 23769fe commit fb87595
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 183 deletions.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Expand Up @@ -124,6 +124,12 @@ jobs:
name: Context Info Cmds
command: pwd && ls -ltra && git branch

- run:
name: Initialize Repo Makefiles
command: |
make init-makefiles
git update-index --assume-unchanged "Makefile"
- run:
name: Release New Version
command: |
Expand All @@ -133,7 +139,7 @@ jobs:
echo "==============================================================================================="
git config --global user.email "$GIT_USER_EMAIL"
git config --global user.name "$GIT_USER_NAME"
make -f Makefile.release release-$VERSION_NUMBER-with-changelog-circleci
make release-$VERSION_NUMBER-with-changelog-circleci
else
echo "==============================================================================================="
echo "Changes in working directory pending to be pushed - please check 'git status' cmd output below "
Expand Down
27 changes: 20 additions & 7 deletions Makefile
@@ -1,5 +1,7 @@
.PHONY: help
SHELL := /bin/bash
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ./@bin/makefiles

PROJECT_SHORT := bb

Expand Down Expand Up @@ -32,6 +34,23 @@ help:
@echo 'Available Commands:'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " - \033[36m%-18s\033[0m %s\n", $$1, $$2}'

#==============================================================#
# INITIALIZATION #
#==============================================================#
init-makefiles: ## initialize makefiles
rm -rf ${MAKEFILES_DIR}
mkdir -p ${MAKEFILES_DIR}
git clone https://github.com/binbashar/le-dev-makefiles.git ${MAKEFILES_DIR}
echo "" >> ${MAKEFILE_PATH}
sed -i '/^#include.*/s/^#//' ${MAKEFILE_PATH}

#
## IMPORTANT: Automatically managed
## Must NOT UNCOMMENT the #include lines below
#
#include ${MAKEFILES_DIR}/circleci/circleci.mk
#include ${MAKEFILES_DIR}/release-mgmt/release.mk

#==============================================================#
# TERRAFORM #
#==============================================================#
Expand Down Expand Up @@ -64,9 +83,3 @@ tflint-deep: ## TFLint is a Terraform linter for detecting errors that can not b
--aws-profile=${LOCAL_OS_AWS_PROFILE} \
--aws-creds-file=/root/.aws/credentials \
--aws-region=${LOCAL_OS_AWS_REGION}

#==============================================================#
# CIRCLECI #
#==============================================================#
circleci-validate-config: ## Validate A CircleCI Config (https://circleci.com/docs/2.0/local-cli/)
circleci config validate .circleci/config.yml
175 changes: 0 additions & 175 deletions Makefile.release

This file was deleted.

0 comments on commit fb87595

Please sign in to comment.