-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
40 lines (29 loc) · 934 Bytes
/
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
40
include .env
export $(shell sed 's/=.*//' .env)
publish_name := Spring-PetClinic
dist := ./dist/$(publish_name)
OSS_BUCKET ?= fun-pkg-hk-1
PROFILE ?= fc-demo
clean:
rm -rf dist/*
mvn clean
prepare:
mkdir -p $(dist)
package: prepare
mvn package -Dmaven.test.skip=true
zip -r $(dist)/code.zip bootstrap target/spring-petclinic-*.jar
fun package --oss-bucket $(OSS_BUCKET)
build: package
cp -r doc/*.md $(dist)
sed -e 's/CodeUri:.*/CodeUri: oss:\/\/%bucket%\/%templateName%\/code.zip/g' template.yml > $(dist)/template.yml
deploy: build
fun deploy --use-ros --stack-name spring-test -y
undeploy:
$(eval StackId=$(shell aliyun --profile $(PROFILE) ros ListStacks --StackName.1 spring-test | jq -r '.Stacks[0].StackId'))
aliyun --profile $(PROFILE) ros DeleteStack --StackId $(StackId)
publish: build
cd $(dist); fcat publish
publish-prod: build
cd $(dist); fcat publish -p
unpublish:
fcat delete $(publish_name)