diff options
author | Vincent Petithory <vincent.petithory@gmail.com> | 2013-09-24 20:41:01 +0200 |
---|---|---|
committer | Vincent Petithory <vincent.petithory@gmail.com> | 2013-09-24 20:41:01 +0200 |
commit | 0938aa15367caa3332d0b812b6e4514d14772e0d (patch) | |
tree | d8fa02fb38b81cdb93eab6c86a8d9b108b243fb3 /tools/client-updates/src/client-updates-gen | |
parent | 31c7f033233c92cee1e2f3f9d1c6f54c878f130c (diff) | |
download | clientdata-0938aa15367caa3332d0b812b6e4514d14772e0d.tar.gz clientdata-0938aa15367caa3332d0b812b6e4514d14772e0d.tar.bz2 clientdata-0938aa15367caa3332d0b812b6e4514d14772e0d.tar.xz clientdata-0938aa15367caa3332d0b812b6e4514d14772e0d.zip |
Remove deprecated client-updates
Diffstat (limited to 'tools/client-updates/src/client-updates-gen')
-rwxr-xr-x | tools/client-updates/src/client-updates-gen | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/tools/client-updates/src/client-updates-gen b/tools/client-updates/src/client-updates-gen deleted file mode 100755 index 76c0ed34..00000000 --- a/tools/client-updates/src/client-updates-gen +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -# config -SRC=$(dirname $(readlink -f "$0")) - -. ${SRC}/client-updates.conf - -# Check we are on the $CLIENT_DATA_BRANCH branch -git --git-dir "${CLIENT_DATA_DIR}/.git" branch | grep -q "^* $CLIENT_DATA_BRANCH" || { echo "The client-data repository is not on $CLIENT_DATA_BRANCH branch. Exiting"; exit 2; } - -# Unless specified on 1st argument, we'll use the latest revision that was -# included in updates, as starting revision. -# If this is the initial generation, this argument is mandatory. -if [ $# -gt 0 ]; then - OLD_CLIENT_DATA_HEAD="$1" -else - # Get the last commit sha where we generated an update - # This assumes the generated zip names follow the pattern: update-SHA1..SHA2.zip - OLD_CLIENT_DATA_HEAD=$(tail -n 1 ${UPDATES_DIR}/release/resources2.txt | cut -d . -f 3) -fi - -# Unless specified on 2nd argument, we'll use the HEAD as final revision. -if [ $# -gt 1 ]; then - NEW_CLIENT_DATA_HEAD="$2" -else - # get the commit SHA from the client data repo - NEW_CLIENT_DATA_HEAD=$(git --git-dir "${CLIENT_DATA_DIR}/.git" rev-parse HEAD | cut -c 1-7) -fi - -if [ "$OLD_CLIENT_DATA_HEAD" = "$NEW_CLIENT_DATA_HEAD" ]; then - echo "Everything is up-to-date." - exit 0 -fi - -update_basename="update-${OLD_CLIENT_DATA_HEAD}..${NEW_CLIENT_DATA_HEAD}" - -# generate a diff of files to package -cd ${CLIENT_DATA_DIR} -git --git-dir "${CLIENT_DATA_DIR}/.git" log --name-status ${OLD_CLIENT_DATA_HEAD}..${NEW_CLIENT_DATA_HEAD} | awk '/^(A|M)\t/ {print $2}' | sort | uniq | xargs zip -9 -r "${UPDATES_DIR}/${update_basename}.zip" > /dev/null -cd - > /dev/null - -if [ ! -f "${UPDATES_DIR}/${update_basename}.zip" ];then - echo "Error while generating ${update_basename}.zip. Exiting." > /dev/stderr - exit 1 -fi - -# package update -cd "${UPDATES_DIR}" -mkdir -p "release" -${SRC}/adler32 "${update_basename}.zip" >> "release/resources2.txt" -hash=$(tail -n 1 "release/resources2.txt" | awk '{ print $2; }') -# populate resources.xml as well -xmlentry="<update type=\"data\" file=\"${update_basename}.zip\" hash=\"${hash}\" />" - -sed -i '$d' 'release/resources.xml' -echo " $xmlentry" >> 'release/resources.xml' -echo '</updates>' >> 'release/resources.xml' - -echo "Adding ${update_basename}.zip:" -# Display the contents of the update -unzip -l ${update_basename}.zip -mv "${update_basename}.zip" "release/" -# Copy resources -git add 'release' -git commit -m "Updating resources to ${NEW_CLIENT_DATA_HEAD}" > /dev/null -cd - > /dev/null - -exit 0 |