From 3992a9feac28c945b7ea4b0b71cff869f1c0c9ab Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Mon, 19 Jun 2023 11:03:47 +0200 Subject: [PATCH] add vendor.tgz to release (#68) --- .github/workflows/build-binary-package.yml | 4 ++-- .gitignore | 6 ++++-- Makefile | 9 +++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-binary-package.yml b/.github/workflows/build-binary-package.yml index c812510..9cdb2fb 100644 --- a/.github/workflows/build-binary-package.yml +++ b/.github/workflows/build-binary-package.yml @@ -31,11 +31,11 @@ jobs: - name: Build all versions run: | - make platform-all + make vendor platform-all - name: Upload to release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | tag_name="${GITHUB_REF##*/}" - hub release edit $(find . -name "$PROGRAM_NAME*" -maxdepth 1 -printf "-a %p ") -m "" "$tag_name" + hub release edit $(find . -name "$PROGRAM_NAME*" -maxdepth 1 -printf "-a %p ") -a vendor.tgz -m "" "$tag_name" diff --git a/.gitignore b/.gitignore index ce97c2e..99b865d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,10 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out -# Dependency directories (remove the comment below to include it) -# vendor/ +# Dependencies are not vendored by default, but a tarball is created by "make vendor" +# and provided in the release. Used by freebsd, gentoo, etc. +vendor/ +vendor.tgz # Python __pycache__/ diff --git a/Makefile b/Makefile index 5b0c41e..9033217 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,15 @@ func-tests: build RELDIR = $(BINARY_NAME)-$(BUILD_VERSION) +.PHONY: vendor +vendor: + $(GOCMD) mod vendor + tar czf vendor.tgz vendor + +.PHONY: vendor-remove +vendor-remove: + $(RM) -r vendor vendor.tgz + # Called during platform-all, to reuse the directory for other platforms .PHONY: clean-release-dir clean-release-dir: