summaryrefslogtreecommitdiff
path: root/platform/ios/scripts/package.sh
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-01-22 01:52:16 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-01-22 14:45:58 -0800
commit5213abbde583d14bc9998b5346b1377bbcf8648b (patch)
treea1559db15a65bb270d84827cdbe23b1940619ef5 /platform/ios/scripts/package.sh
parent1ddce4cb3a7a1bd0b3fe9c15f09b4bb3c642c86d (diff)
downloadqtlocation-mapboxgl-5213abbde583d14bc9998b5346b1377bbcf8648b.tar.gz
[ios] Rewrote package readme
The build output’s readme now explains in full detail the installation process, rather than linking to an online resource that may not match the current version. Also cleaned up the tag-finding code to better handle double-digit situations.
Diffstat (limited to 'platform/ios/scripts/package.sh')
-rwxr-xr-xplatform/ios/scripts/package.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index b46fb479bc..39e49aa170 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -191,7 +191,7 @@ if [[ ${BUILD_STATIC} == true ]]; then
fi
step "Copying library resources…"
-SHORT_VERSION=$( git tag -l ios-v* | sed 's/^ios-v//' | sort -r | sed -n '1p' )
+SHORT_VERSION=$( git describe --tags --match=ios-v*.*.* --abbrev=0 | sed 's/^ios-v//' )
cp -pv LICENSE.md "${OUTPUT}"
cp -rv ios/app/Settings.bundle "${OUTPUT}"
if [[ ${BUILD_STATIC} == true ]]; then
@@ -220,14 +220,14 @@ if [ -z `which jazzy` ]; then
fi
fi
DOCS_OUTPUT="${OUTPUT}/documentation"
-DOCS_VERSION=$( git tag -l ios-v* | sed 's/^ios-//' | sort -r | grep -v '\-rc.' | grep -v '\-pre.' | sed -n '1p' | sed 's/^v//' )
+DOCS_VERSION=$( git describe --tags --match=ios-v*.*.* --abbrev=0 | sed -e 's/^ios-v//' -e 's/-.*//' )
rm -rf /tmp/mbgl
mkdir -p /tmp/mbgl/
README=/tmp/mbgl/README.md
-cat ios/docs/pod-README.md > ${README}
-echo >> ${README}
-echo -n "#" >> ${README}
-cat CHANGELOG.md | sed -n "/^## iOS ${DOCS_VERSION}/,/^##/p" | sed '$d' >> ${README}
+cp ios/docs/pod-README.md "${README}"
+CHANGES=/tmp/mbgl/CHANGES.md
+cat CHANGELOG.md | sed -n "/^## iOS ${DOCS_VERSION}/,/^##/p" | sed '$d' | sed "s/^## iOS ${DOCS_VERSION}//g" > "${CHANGES}"
+sed -i '' -e "s/{{VERSION}}/${DOCS_VERSION}/" -e "/{{CHANGES}}/r${CHANGES}" -e 's/{{CHANGES}}//g' "${README}"
cp ${README} "${OUTPUT}"
jazzy \