Skip to content

Commit

Permalink
BBL-381 | adding Makefile standalone approach for ref-architecture la…
Browse files Browse the repository at this point in the history
…yer + sintaxt spaces improvement
  • Loading branch information
exequielrafaela committed Sep 11, 2020
1 parent b362ada commit 5c2353a
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 60 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: help
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ./@bin/makefiles
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ./@bin/makefiles

help:
@echo 'Available Commands:'
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: help
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../../@bin/makefiles
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../../@bin/makefiles

#
# ARG VARIABLES
Expand Down
6 changes: 3 additions & 3 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: help
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles

#
# ARG VARIABLES
Expand Down
6 changes: 3 additions & 3 deletions helm/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: help
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles

#
# ARG VARIABLES
Expand Down
6 changes: 3 additions & 3 deletions jenkins/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: help
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles

#
# ARG VARIABLES
Expand Down
58 changes: 16 additions & 42 deletions ref-architecture/Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
.PHONY: help
SHELL := /bin/bash
MAKEFILE_IMPORT_GIT := ../@bin/makefiles/git/Makefile.git
MAKEFILE_IMPORT_GITHUB := ../@bin/makefiles/github/Makefile.github

#
# MAKE GIT DEFINITIONS
#
define MAKE_GIT
make \
-f ${MAKEFILE_IMPORT_GIT} \
REPOS_LIST='${REPOS_LIST}'
endef

#
# MAKE GITHUB DEFINITIONS
#
define MAKE_GITHUB
make \
-f ${MAKEFILE_IMPORT_GITHUB} \
REPOS_LIST='${REPOS_LIST}' \
GIT_GITHUB_REPO_TOPICS='${GIT_GITHUB_REPO_TOPICS}'
endef
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles

#
# ARG VARIABLES
Expand All @@ -42,25 +23,18 @@ help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " - \033[36m%-18s\033[0m %s\n", $$1, $$2}'

#==============================================================#
# GITHUB MODULE MGMT #
# INITIALIZATION #
#==============================================================#
github-repo-get-all-topics: ## Github get all repo topics - eg: make GITHUB_TOKEN="4df7...406" -f Makefile.github github-repo-get-all-topics
${MAKE_GITHUB} github-repo-get-all-topics
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}

github-repo-replace-all-topics: ## Github replace all repo topics - eg: make GITHUB_TOKEN="4df7...406" -f Makefile.github github-repo-replace-all-topics
${MAKE_GITHUB} github-repo-replace-all-topics

#==============================================================#
# GIT MODULE MGMT #
#==============================================================#
git-clone-repo: ## Git clone repo
${MAKE_GIT} git-clone-repo

git-pull-master: ## Git pull repo from master branch
${MAKE_GIT} git-pull-master

git-sync-fork-upstream: ## Git sync from master forked upstream repos
${MAKE_GIT} git-sync-fork-upstream

git-sync-tag-fork-upstream: ## Git tag sync from master forked upstream repos
${MAKE_GIT} git-sync-tag-fork-upstream
#
## IMPORTANT: Automatically managed
## Must NOT UNCOMMENT the #include lines below
#
#include ${MAKEFILES_DIR}/git/git.mk
#include ${MAKEFILES_DIR}/github/github.mk
6 changes: 3 additions & 3 deletions terraform/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: help
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles
SHELL := /bin/bash
MAKEFILE_PATH := ./Makefile
MAKEFILES_DIR := ../@bin/makefiles

#
# ARG VARIABLES
Expand Down

0 comments on commit 5c2353a

Please sign in to comment.