Merge pull request #59 from deathbaba/guide_pipeline
[build] Use icons in Android pipeline.
This commit is contained in:
commit
7db101f85e
2 changed files with 15 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
GWMvc=3
|
||||
GWMvn=1.0.2
|
||||
GWMvc=4
|
||||
GWMvn=1.2
|
||||
GWMpn=com.guidewithme.any
|
||||
GWMapk=Any_Guide_With_Me
|
||||
GWMappName=Any Guide With Me
|
||||
|
|
|
@ -4,15 +4,26 @@ set -e -u
|
|||
|
||||
cat countries_to_generate.txt | while read country; do
|
||||
|
||||
# copy index
|
||||
rm ../../android/assets/index.dat || echo "No previous index found."
|
||||
cp -f Countries/$country/index.dat ../../android/assets/
|
||||
|
||||
# copy resources
|
||||
toCopy=(drawable-ldpi drawable-mdpi drawable-hdpi \
|
||||
drawable-xhdpi drawable-xxhdpi)
|
||||
|
||||
for resDir in ${toCopy[*]}
|
||||
do
|
||||
cp -f ../../android/icons/$country/$resDir/* ../../android/res/$resDir
|
||||
echo "Copied $resDir for $country"
|
||||
done
|
||||
|
||||
rm ../../android/build/apk/* || true
|
||||
rm Countries/$country/*.apk || true
|
||||
|
||||
# make packages lower case and dot-separated
|
||||
PACKAGE="com.guidewithme."$(echo "$country" | tr '[:upper:]' '[:lower:]' | \
|
||||
sed 's/_/\./g')
|
||||
sed 's/_/\./g')
|
||||
|
||||
# hack for UK
|
||||
if [[ "$PACKAGE" == *united.kingdom ]]
|
||||
|
@ -25,7 +36,7 @@ cat countries_to_generate.txt | while read country; do
|
|||
|
||||
pushd ../../android/
|
||||
./gradlew "-PGWMpn=$PACKAGE" "-PGWMapk=Guide With Me $country" \
|
||||
"-PGWMappName=$TITLE Guide With Me" clean assembleRelease
|
||||
"-PGWMappName=$TITLE Guide With Me" clean assembleRelease
|
||||
popd
|
||||
|
||||
cp ../../android/build/apk/* Countries/$country/
|
||||
|
|
Reference in a new issue