forked from pool/terragrunt
f9e680a132
update to 0.58.4 (refactor packaging, due to upstream changes OBS-URL: https://build.opensuse.org/request/show/1173450 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:terraform/terragrunt?expand=0&rev=258
37 lines
951 B
Makefile
37 lines
951 B
Makefile
NAME = terragrunt
|
|
|
|
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|
mkfile_dir := $(dir $(mkfile_path))
|
|
export GOPATH := $(mkfile_dir)/tmpdir/
|
|
|
|
# make sure ./ is in the path,
|
|
# otherwise mockery is not found...
|
|
export PATH := :$(mkfile_dir)/tmpdir/bin:$(PATH)
|
|
|
|
default: clean tar
|
|
|
|
clean:
|
|
rm -rf $(NAME) $(NAME)-*.obscpio vendor.tar.gz ./tmpdir
|
|
|
|
tar:
|
|
osc service manualrun
|
|
mkdir -p ./tmpdir/src/ && \
|
|
rm -rf ./tmpdir/src/ && \
|
|
echo "Copy files to ./tmpdir/src/" && \
|
|
cp -r ./terragrunt/ ./tmpdir/src && \
|
|
cd ./tmpdir/src/ && \
|
|
echo "Installing mockery" && \
|
|
go install github.com/vektra/mockery/v2@v2.43.0 && \
|
|
echo "Starting go generate" && \
|
|
go generate ./... && \
|
|
go mod download && \
|
|
go mod vendor && \
|
|
echo "Creating tarball vendor.tar.gz" && \
|
|
tar czf ../../vendor.tar.gz ./vendor && \
|
|
ls -lh ../../vendor.tar.gz && \
|
|
echo "Cleaning up" && \
|
|
go clean -modcache && \
|
|
cd ../../ && \
|
|
rm -rf ./tmpdir && \
|
|
echo "Finished"
|