-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 1.28 KB
/
Makefile
File metadata and controls
35 lines (29 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
channel := Unstable
app_slug := "${REPLICATED_APP}"
version := "0.1.0-dev-${USER}"
release_notes := "CLI release by ${USER} on $(shell date)"
SHELL := /bin/bash -o pipefail
.PHONY: deps-vendor-cli
deps-vendor-cli:
@if [[ -x deps/replicated ]]; then exit 0; else \
echo '-> Downloading Replicated CLI... '; \
mkdir -p deps/; \
if [[ "`uname`" == "Linux" ]]; then curl -fsSL https://github.com/replicatedhq/replicated/releases/download/v0.15.0/replicated_0.15.0_linux_amd64.tar.gz | tar xvz -C deps; exit 0; fi; \
if [[ "`uname`" == "Darwin" ]]; then curl -fsSL https://github.com/replicatedhq/replicated/releases/download/v0.15.0/replicated_0.15.0_darwin_amd64.tar.gz | tar xvz -C deps; exit 0; fi; fi;
.PHONY: check-api-token
check-api-token:
@if [ -z "${REPLICATED_API_TOKEN}" ]; then echo "Missing REPLICATED_API_TOKEN"; exit 1; fi
.PHONY: check-app
check-app:
@if [ -z "$(app_slug)" ]; then echo "Missing REPLICATED_APP"; exit 1; fi
.PHONY: list-releases
list-releases: check-api-token check-app deps-vendor-cli
deps/replicated release ls --app $(app_slug)
.PHONY: release
release: check-api-token check-app deps-vendor-cli
deps/replicated release create \
--app $(app_slug) \
--yaml-dir manifests \
--promote $(channel) \
--version $(version) \
--release-notes $(release_notes)