Skip to content

Commit

Permalink
docs: remove github repository publish & clarify what makefile still…
Browse files Browse the repository at this point in the history
… does
  • Loading branch information
sheldonhull committed Feb 12, 2024
1 parent bd19187 commit 2f7023d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 64 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/github.yml

This file was deleted.

11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ SECRET_FILE := ".artifacts/secret.yaml"

.PHONY: clean-image clean-injector clean-syncer clean image install-injector
install-syncer install-image install-host install release uninstall-injector
uninstall-syncer uninstall init lint fix addsecret
uninstall-syncer uninstall init lint fix addsecret warn help/all help/short

all: binaries image
all: warn help/all

ifeq ($(OS),Windows_NT)
INJECTOR_BIN:=$(INJECTOR_NAME).exe
Expand Down Expand Up @@ -85,6 +85,8 @@ init::
trunk install --ci
python3 -m pip install pre-commit --user && pre-commit install || echo "❌ pre-commit failing to install"



## 🧪 Apply a secret to test the sync and injection using default context
addsecret:
if [test -f "${SECRET_FILE}"; then \
Expand Down Expand Up @@ -192,7 +194,4 @@ init::
ifndef TRANSLATE_COLON_NOTATION
%:
@$(SELF) -s $(subst :,/,$@) TRANSLATE_COLON_NOTATION=false
endif



endif
14 changes: 8 additions & 6 deletions Makefile.helpers
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#
# Helpers - stuff that's shared between make files
# Written Originally by https://github.com/cloudposse/build-harness/blob/master/Makefile.helpers, Apache License 2.0
Expand Down Expand Up @@ -26,6 +25,9 @@ define assert-unset
@$(if $($1),$(error $(1) should not be defined in $(@)),)
endef

warn:
@printf "\e[33m🚨 make is deprecated, all automation excepting install-host for debugging have been moved to mage. Future changes should be made to mage.\e[0m\n"

test/assert-set:
$(call assert-set,PATH)
@echo assert-set PASS
Expand All @@ -37,21 +39,21 @@ test/assert-unset:
test/assert: test/assert-set test/assert-unset
@exit 0

default:: $(DEFAULT_HELP_TARGET)
default:: warn $(DEFAULT_HELP_TARGET)
@exit 0

## Help screen
help:
help: warn
@printf "Available targets:\n\n"
@$(SELF) -s help/generate | grep -E "\w($(HELP_FILTER))"

## Display help for all targets
help/all:
help/all: warn
@printf "Available targets:\n\n"
@$(SELF) -s help/generate

## This help short screen
help/short:
help/short: warn
@printf "Available targets:\n\n"
@$(SELF) -s help/generate MAKEFILE_LIST="Makefile $(BUILD_HARNESS_PATH)/Makefile.helpers"

Expand All @@ -68,4 +70,4 @@ help/generate:
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST) | sort -u
@printf "\n"
@printf "\n"
12 changes: 8 additions & 4 deletions docs/setup-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ While the majority of this is cross-platform, the automatically linting and some

## Overview

- Make: Makefiles provide core automation from the original project.
This has slowly been phased out for the more robust Mage tasks.
Most of your usage won't touch Make.
- Mage: Mage is a Go based automation alternative to Make and provides newer functionality for local Kind cluster setup, Go development tooling/linting, and more.
Use [aqua](#aqua) to automaticall install, or run `go install github.com/magefile/mage@latest`.
Use [aqua](#aqua) to automatically install.
- Run `mage` to list all available tasks, and `mage init` to setup developer tooling.
Get more detail on a task, if it's available by running `mage -h init`.

- Make: Makefiles provide core automation from the original project.
- This has slowly been phased out for the more robust Mage tasks.
Most of your usage won't touch Make.
The only usage that _might_ use this is the local cert based setup for debugger.
This hasn't been used in years by current maintainers, as log streaming from mage/tilt UI have been primary method.
- For anything other than running the debugger, use `mage` commands which have been regularly improved and tested and move any new automation to the magefiles.

## Initial Setup

## Aqua
Expand Down
15 changes: 14 additions & 1 deletion magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,21 @@ func TrunkInit() error {
return sh.RunV("trunk", "install")
}

// Clean up after yourself.
// 🗑️ Clean removes just the artifacts (generated by goreleaser).
func Clean() {
pterm.Success.Println("Cleaning...")
for _, dir := range []string{constants.ArtifactDirectory} {
err := os.RemoveAll(dir)
if err != nil {
pterm.Error.Printf("failed to removeall: [%s] with error: %v\n", dir, err)
}
pterm.Success.Printf("🧹 [%s] dir removed\n", dir)
}
mg.Deps(createDirectories)
}

// 🗑️ DeepClean removes artifacts, as well as local cached working files and generated credential artifacts.
func DeepClean() {
pterm.Success.Println("Cleaning...")
for _, dir := range []string{constants.ArtifactDirectory, constants.CacheDirectory, constants.ConfigsDirectory} {
err := os.RemoveAll(dir)
Expand Down

0 comments on commit 2f7023d

Please sign in to comment.