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

Commit

Permalink
init: use stack as a prefix instead of a suffix
Browse files Browse the repository at this point in the history
Previously, files were named things like "Makefile.stack", and now
they're named things like "stack.Makefile". This way, they'll all show
up next to each other when the directory is listed, so it's a bit more
convenient.

Signed-off-by: suskin <[email protected]>
  • Loading branch information
suskin committed Aug 26, 2019
1 parent 3622fec commit 31443d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bin/kubectl-crossplane-stack-build
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ shift
set -e
set -x

make -f Makefile.stack ${COMMAND} "$@"
make -f stack.Makefile ${COMMAND} "$@"
16 changes: 5 additions & 11 deletions bin/kubectl-crossplane-stack-init
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ set -x
STACK_NAME=${1}
INIT_DIR=${2:-$PWD}

# Create dirs
# Create manifest files
# Create sample install file
# Create Dockerfile
# Create Makefile

function create_dirs {
mkdir -p config/stack
}
Expand Down Expand Up @@ -97,7 +91,7 @@ EOF
}

function create_build {
cat > Dockerfile.stack <<'EOF'
cat > stack.Dockerfile <<'EOF'
# Build the manager binary
FROM golang:1.12.5 as builder
Expand Down Expand Up @@ -126,7 +120,7 @@ COPY --from=builder /workspace/manager .
ENTRYPOINT ["/manager"]
EOF

cat > env.stack <<EOF
cat > stack.env <<EOF
# Image URL to use all building/pushing image targets
IMG ?= ${STACK_NAME}:latest
Expand All @@ -136,8 +130,8 @@ LOCAL_OVERRIDES_DIR=config/samples/overrides
CONFIG_SAMPLES_DIR=config/stack/samples
EOF

cat > Makefile.stack <<'EOF'
include env.stack
cat > stack.Makefile <<'EOF'
include stack.env
GO111MODULE ?= on
export GO111MODULE
Expand Down Expand Up @@ -264,7 +258,7 @@ stack-uninstall:
# Build the docker image
docker-build: test
docker build --file Dockerfile.stack . -t ${IMG}
docker build --file stack.Dockerfile . -t ${IMG}
@echo "updating kustomize image patch file for manager resource"
@# The argument to sed -i and the subsequent rm make the in-place sed work well on MacOS.
@# There is no good way to do an in-place replacement with sed without leaving behind a
Expand Down
2 changes: 1 addition & 1 deletion bin/kubectl-crossplane-stack-publish
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -e
set -x

make -f Makefile.stack publish
make -f stack.Makefile publish

0 comments on commit 31443d6

Please sign in to comment.