diff --git a/.github/actions/build/action.yaml b/.github/actions/build/action.yaml index 32898785..fd031a1d 100644 --- a/.github/actions/build/action.yaml +++ b/.github/actions/build/action.yaml @@ -6,8 +6,9 @@ runs: with: fetch-depth: 0 - - run: git submodule update --init --recursive go.mk + - run: make go.mk shell: bash + - uses: ./go.mk/.github/actions/setup - uses: ./go.mk/.github/actions/pre-check diff --git a/.gitignore b/.gitignore index 86f2134d..a61d00a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .git +/go.mk dist release exo diff --git a/CHANGELOG.md b/CHANGELOG.md index a0babd90..b8f306fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Unreleased + +### Improvements +- go.mk: use as a plain repo instead of a submodule #575 + ## 1.76.0 ### Bug Fixes diff --git a/Makefile b/Makefile index 03d7ef57..4f90ee53 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,39 @@ +GO_MK_REF := v1.0.0 + +# make go.mk a dependency for all targets +.EXTRA_PREREQS = go.mk + +ifndef MAKE_RESTARTS +# This section will be processed the first time that make reads this file. + +# This causes make to re-read the Makefile and all included +# makefiles after go.mk has been cloned. +Makefile: + @touch Makefile +endif + +# All files included from go.mk need an associated target or make will error +# before go.mk can be cloned. +go.mk/init.mk: include go.mk/init.mk +go.mk/public.mk: include go.mk/public.mk +.PHONY: go.mk +.ONESHELL: +go.mk: + @if [ ! -d "go.mk" ]; then + git clone https://github.com/exoscale/go.mk.git + fi + @cd go.mk + @if ! git show-ref --quiet --verify "refs/heads/${GO_MK_REF}"; then + git fetch + fi + @if ! git show-ref --quiet --verify "refs/tags/${GO_MK_REF}"; then + git fetch --tags + fi + git checkout --quiet ${GO_MK_REF} + PROJECT_URL = https://github.com/exoscale/cli GO_BIN_OUTPUT_NAME := exo OAS_FILE := public-api.json diff --git a/go.mk b/go.mk deleted file mode 160000 index 314a757b..00000000 --- a/go.mk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 314a757ba0e1668ebfe7252269d4b58560854c69