forked from qingstor/qingstor-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (56 loc) · 1.67 KB
/
Copy pathMakefile
File metadata and controls
64 lines (56 loc) · 1.67 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
SHELL := /bin/bash
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " all to update, generate and test this SDK"
@echo " test to run service test"
@echo " unit to run all sort of unit tests except runtime"
@echo " update to update git submodules"
@echo " generate to generate service code"
@echo " generate-docs to geterate service and bucket APIs docs"
all: update generate unit
test:
@echo "run service test"
@if [[ ! -f "$$(which javac)" ]]; then \
echo "ERROR: Command \"javac\" not found."; \
fi
rm -f build/libs/qingstor*test*.jar
./gradlew buildTestJar
rm -fr tests/jars
mkdir tests/jars
cp build/libs/qingstor*test*.jar tests/jars/
pushd "tests";\
javac -cp "./jars/*:." scenario_impl/*.java;\
java -cp "./jars/*:." cucumber.api.cli.Main -g scenario_impl features;\
popd
rm -fr tests/jars
rm -f tests/scenario_impl/*.class
@echo "ok"
generate:
@if [[ ! -f "$$(which snips)" ]]; then \
echo "ERROR: Command \"snips\" not found."; \
fi
snips \
-f=./specs/qingstor/2016-01-06/swagger/api_v2.0.json -t=./template -o=./src/main/java/com/qingstor/sdk/service
rm ./src/main/java/com/qingstor/sdk/service/Object.java
./gradlew formatGenerateCode
@echo "ok"
generate-docs:
@if [[ ! -f "$$(which snips)" ]]; then \
echo "ERROR: Command \"snips\" not found.";\
fi
snips \
-f=./specs -t=./docs/template -o=./docs/source/api
rm ./docs/source/api/object.md
@echo
update:
git submodule update --init
@echo "ok"
unit:
@echo "run unit test"
./gradlew test
@echo "ok"
buildJar:
@echo "run build jar"
./gradlew buildJar
./gradlew buildIncludeDependentJar
@echo "ok"