2015-08-19 13:26:07 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-10-03 13:51:30 -04:00
|
|
|
# Note: once the subtree merge from this script has been committed and pushed to
|
|
|
|
# a branch do not attempt to rebase the branch back onto master or the subdirectory
|
|
|
|
# structure will be lost.
|
|
|
|
# http://git.661346.n2.nabble.com/subtree-merges-lose-prefix-after-rebase-td7332850.html
|
|
|
|
|
2015-08-19 13:26:07 -04:00
|
|
|
OSMIUM_REPO=https://github.com/osmcode/libosmium.git
|
2016-10-03 13:08:45 -04:00
|
|
|
OSMIUM_TAG=v2.9.0
|
2015-08-19 13:26:07 -04:00
|
|
|
|
2015-09-11 11:14:36 -04:00
|
|
|
VARIANT_REPO=https://github.com/mapbox/variant.git
|
2016-03-24 16:26:31 -04:00
|
|
|
VARIANT_TAG=v1.1.0
|
2015-08-19 13:26:07 -04:00
|
|
|
|
2015-08-28 06:40:40 -04:00
|
|
|
VARIANT_LATEST=$(curl https://api.github.com/repos/mapbox/variant/releases/latest | jq ".tag_name")
|
|
|
|
OSMIUM_LATEST=$(curl https://api.github.com/repos/osmcode/libosmium/releases/latest | jq ".tag_name")
|
2015-08-19 13:26:07 -04:00
|
|
|
|
2015-08-19 14:20:43 -04:00
|
|
|
echo "Latest osmium release is $OSMIUM_LATEST, pulling in \"$OSMIUM_TAG\""
|
|
|
|
echo "Latest variant release is $VARIANT_LATEST, pulling in \"$VARIANT_TAG\""
|
|
|
|
|
|
|
|
read -p "Looks good? (Y/n) " ok
|
|
|
|
|
|
|
|
if [[ $ok =~ [yY] ]]
|
|
|
|
then
|
2015-08-19 14:22:57 -04:00
|
|
|
git subtree pull -P third_party/libosmium/ $OSMIUM_REPO $OSMIUM_TAG --squash
|
|
|
|
git subtree pull -P third_party/variant/ $VARIANT_REPO $VARIANT_TAG --squash
|
2015-08-19 14:20:43 -04:00
|
|
|
fi
|