File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ GITHUB_REPO := vigetlabs/terraform-module-viget-sso-access
2
+ FILES_TO_COMPRESS := outputs.tf roles.tf saml_providers.tf variables.tf versions.tf
3
+ GITHUB_CLI := gh
4
+
1
5
.DEFAULT_GOAL = help
2
- EXECUTABLE_DEPS = terraform-docs
6
+ EXECUTABLE_DEPS = terraform-docs gh jq
3
7
4
8
# Test for executable dependencies
5
9
K := $(foreach exec,$(EXECUTABLE_DEPS ) ,\
26
30
# # Generate terraform documentation and add to README.md
27
31
docs :
28
32
terraform-docs -c .terraform.docs.yml .
33
+
34
+ # # Release a new version of the module
35
+ release : # TODO: clean this up and automate better
36
+ # Set the release tag and version
37
+ $(eval TAG := $(shell git describe --tags --abbrev=0) )
38
+ $(eval VERSION := $(shell git describe --tags) )
39
+
40
+ # Create a GitHub release
41
+ $(GITHUB_CLI) release create $(VERSION) --repo $(GITHUB_REPO) --title "$(VERSION)" --notes "Release $(VERSION)" --draft
42
+
43
+ # Compress the list of files
44
+ mkdir -p dist
45
+ tar -czvf dist/$(TAG).tar.gz $(FILES_TO_COMPRESS)
46
+
47
+ # Upload the compressed archive to the GitHub release
48
+ $(GITHUB_CLI) release upload $(VERSION) --repo $(GITHUB_REPO) dist/$(TAG).tar.gz
49
+
50
+ # # Clean up generated files
51
+ clean :
52
+ rm -rf dist
You can’t perform that action at this time.
0 commit comments