File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
-
2
1
RELTMPDIR =/tmp/release.$(CO_VERSION )
3
2
RELFILE =/tmp/postgres-operator.$(CO_VERSION ) .tar.gz
4
3
4
+ # ======= Safety checks =======
5
+ check-go-vars :
6
+ ifndef GOPATH
7
+ $(error GOPATH is not set)
8
+ endif
9
+ ifndef GOBIN
10
+ $(error GOBIN is not set)
11
+ endif
12
+
13
+ # ======= Main functions =======
5
14
run :
6
15
cd examples/operator && ./run.sh
7
- pgo :
16
+ pgo : check-go-vars
8
17
cd client && go build -o $(GOBIN ) /pgo pgo.go
9
- clean :
18
+ clean : check-go-vars
10
19
rm -rf $(GOPATH ) /pkg/* $(GOBIN ) /*
11
20
go get -u github.com/FiloSottile/gvt
12
21
gvt restore
13
- operatorimage :
22
+ operatorimage : check-go-vars
14
23
cd operator && go install postgres-operator.go
15
24
cp $(GOBIN ) /postgres-operator bin/postgres-operator
16
25
docker build -t postgres-operator -f $(CO_BASEOS ) /Dockerfile.postgres-operator.$(CO_BASEOS ) .
25
34
push :
26
35
docker push crunchydata/lspvc:$(CO_IMAGE_TAG )
27
36
docker push crunchydata/postgres-operator:$(CO_IMAGE_TAG )
28
- release :
37
+ release : check-go-vars
29
38
rm -rf $(RELTMPDIR ) $(RELFILE )
30
39
mkdir $(RELTMPDIR )
31
40
cp $(GOBIN ) /pgo $(RELTMPDIR )
You can’t perform that action at this time.
0 commit comments