This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathMakefile
39 lines (36 loc) · 1.46 KB
/
Makefile
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
35
36
37
38
39
PKG = github.com/aerogear/mobile-core
TOP_SRC_DIRS = pkg
TEST_DIRS ?= $(shell sh -c "find $(TOP_SRC_DIRS) -name \\*_test.go \
-exec dirname {} \\; | sort | uniq")
BIN_DIR := $(GOPATH)/bin
GOMETALINTER := $(BIN_DIR)/gometalinter
SHELL = /bin/bash
#CHANGE this if using a different url for openshift
OSCP = https://192.168.37.1:8443
NAMESPACE =project2
TAG=latest
LDFLAGS=-ldflags "-w -s -X main.Version=${TAG}"
.PHONY: ui
ui:
cd ui && npm install && npm run bower install && npm run grunt build
apbs:
## Evaluate the presence of the TAG, to avoid evaluation of the nested shell script, during the read phase of make
ifdef TAG
@echo "Preparing $(TAG)"
ifeq ($(shell git ls-files -m | wc -l),0)
@echo "Doing the releae of the Aerogear MCP APBs"
cp artifacts//openshift/template.json cmd/android-apb/roles/provision-android-app/templates
cp artifacts/openshift/template.json cmd/cordova-apb/roles/provision-cordova-apb/templates
cp artifacts/openshift/template.json cmd/ios-apb/roles/provision-ios-apb/templates
git commit -m "[make apbs script] updating Openshift template for APBs" cmd/
cd cmd/android-apb && make build_and_push TAG=$(TAG)
cd cmd/ios-apb && make build_and_push TAG=$(TAG)
cd cmd/cordova-apb && make build_and_push TAG=$(TAG)
else
$(error Aborting release process, since local files are modified)
endif
else
$(error No VERSION defined!)
endif
clean:
./installer/clean.sh