Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Commit

Permalink
build and publish: use Makefile if stack.Makefile not found
Browse files Browse the repository at this point in the history
For template stacks, we have much simpler stack source repositories, and
we don't always need to have a separate `stack.Makefile`. This adds
support for using just a regular, standard `Makefile` if
`stack.Makefile` is not found.

Signed-off-by: suskin <[email protected]>
  • Loading branch information
suskin committed Feb 19, 2020
1 parent 5e2792d commit a6be55e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion bin/kubectl-crossplane-stack-build
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ shift
set -e
set -x

make -f stack.Makefile ${COMMAND} "$@"
# If stack.Makefile exists, we want to use that. Otherwise,
# we'll use a regular Makefile.
if [[ -e stack.Makefile ]]; then
make -f stack.Makefile ${COMMAND} "$@"
else
make ${COMMAND} "$@"
fi
10 changes: 9 additions & 1 deletion bin/kubectl-crossplane-stack-publish
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,12 @@ fi

set -x

make -f stack.Makefile publish
COMMAND=publish

# If stack.Makefile exists, we want to use that. Otherwise,
# we'll use a regular Makefile.
if [[ -e stack.Makefile ]]; then
make -f stack.Makefile ${COMMAND} "$@"
else
make ${COMMAND} "$@"
fi

0 comments on commit a6be55e

Please sign in to comment.