Skip to content

Commit

Permalink
go.mk: remove submodule and initialize through make
Browse files Browse the repository at this point in the history
  • Loading branch information
sauterp committed Feb 23, 2024
1 parent f2865f6 commit 6bbe2e2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive go.mk
- run: make go.mk
- uses: ./go.mk/.github/actions/setup

- uses: ./go.mk/.github/actions/pre-check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
fetch-depth: 0

- run: git submodule update --init --recursive go.mk
- run: make go.mk
shell: bash

- name: Import GPG key
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/go.mk
dist/
bin/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
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

.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}

go.mk/init.mk:
include go.mk/init.mk
go.mk/public.mk:
include go.mk/public.mk

PACKAGE := github.com/exoscale/vault-plugin-auth-exoscale
Expand Down

0 comments on commit 6bbe2e2

Please # to comment.