Skip to content

Commit acd4a23

Browse files
Merge pull request #34 from gabemontero/gen-rel-yaml
BUILD-261: create outside of git control release.yaml to push to repository release page for dev preview install
2 parents 342c22b + 4afd50d commit acd4a23

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
_output
2+
release.yaml

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ vendor: ## Vendor Go dependencies. Example: make vendor
7070
go mod vendor
7171
.PHONY: vendor
7272

73+
generate-release-yaml: ## Create single file with the relevant yaml from the deploy directory to facilitate deployment from the repository's release page
74+
./hack/generate-release-yaml.sh
75+
76+
.PHONY: generate-release-yaml
77+
7378
help: ## Print this help. Example: make help
7479
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
7580
.PHONY: help

hack/generate-release-yaml.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
7+
FILES=(
8+
"00-namespace.yaml"
9+
"0000_10_projectedresource.crd.yaml"
10+
"01-service-account.yaml"
11+
"02-cluster-role.yaml"
12+
"03-cluster-role-binding.yaml"
13+
"csi-hostpath-driverinfo.yaml"
14+
"csi-hostpath-plugin.yaml"
15+
)
16+
17+
rm -f release.yaml
18+
19+
for FILE in ${FILES[@]}
20+
do
21+
22+
echo -e "\n---\n" >> release.yaml
23+
cat deploy/${FILE} >> release.yaml
24+
25+
done

0 commit comments

Comments
 (0)