forked from medic/crosswalk-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (34 loc) · 1.16 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
40
41
.PHONY: default build continue dependencies
export XWALK_OS_ANDROID=1
MAVEN_DIR = maven/org/medicmobile/crosswalk/xwalk_core_library/${TARGET_VERSION}
MAVEN_AAR = ${MAVEN_DIR}/xwalk_core_library-${TARGET_VERSION}.aar
MAVEN_POM = ${MAVEN_DIR}/xwalk_core_library-${TARGET_VERSION}.pom
default: continue
build: dependencies
(cd src/out/Release && \
ninja xwalk_core_library_aar)
continue:
(cd src/out/Release && \
ninja xwalk_core_library_aar && \
ls -al xwalk_core_library.aar)
dependencies:
yes | gclient sync && \
(cd src && \
./build/install-build-deps-android.sh && \
./xwalk/gyp_xwalk)
release:
if [ -z '${TARGET_VERSION}' ]; then echo 'TARGET_VERSION not set'; exit 1; fi
git checkout gh-pages
mkdir -p '${MAVEN_DIR}'
cp src/out/Release/xwalk_core_library.aar '${MAVEN_AAR}'
cp template.pom '${MAVEN_POM}'
# Create a .bak file to maintain compatibility between GNU and BSD sed
sed -i.bak -e 's/__TARGET_VERSION__/${TARGET_VERSION}/' '${MAVEN_POM}'
rm '${MAVEN_POM}.bak'
./scripts/build_maven_index
git add 'maven/'
git commit -m 'Release: ${TARGET_VERSION}'
git push origin gh-pages
git checkout -
git tag 'medic-${TARGET_VERSION}'
git push --tags