diff --git a/Installation/Jenkins/build.sh b/Installation/Jenkins/build.sh index d4fba0f23e..735859fb6e 100755 --- a/Installation/Jenkins/build.sh +++ b/Installation/Jenkins/build.sh @@ -675,9 +675,8 @@ if test -n "${DOWNLOAD_SYNCER_USER}"; then # shellcheck disable=SC2064 trap "curl -s -X DELETE \"https://$DOWNLOAD_SYNCER_USER@api.github.com/authorizations/${OAUTH_ID}\"" EXIT - if test -f "${SRC}/SYNCER_REV"; then - SYNCER_REV=$(cat "${SRC}/SYNCER_REV") - else + SYNCER_REV=$(grep "SYNCER_REV" "${SRC}/VERSIONS" |sed 's;.*"\([0-9a-zA-Z.]*\)".*;\1;') + if test "${SYNCER_REV}" == "latest"; then SYNCER_REV=$(curl -s "https://api.github.com/repos/arangodb/arangosync/releases?access_token=${OAUTH_TOKEN}" | \ grep tag_name | \ head -n 1 | \ @@ -739,9 +738,8 @@ if test -n "${DOWNLOAD_SYNCER_USER}"; then fi if test "${DOWNLOAD_STARTER}" == 1; then - if test -f "${SRC}/STARTER_REV"; then - STARTER_REV=$(cat "${SRC}/STARTER_REV") - else + STARTER_REV=$(grep "STARTER_REV" "${SRC}/VERSIONS" |sed 's;.*"\([0-9a-zA-Z.]*\)".*;\1;') + if test "${STARTER_REV}" == "latest"; then # we utilize https://developer.github.com/v3/repos/ to get the newest release: STARTER_REV=$(curl -s https://api.github.com/repos/arangodb-helper/arangodb/releases | \ grep tag_name | \ diff --git a/Installation/release.sh b/Installation/release.sh index ca28a69504..d23f863153 100755 --- a/Installation/release.sh +++ b/Installation/release.sh @@ -193,8 +193,7 @@ if test -z "${SYNCER_REV}"; then exit 1 fi -echo "${SYNCER_REV}" > SYNCER_REV - +sed -i VERSIONS -e "s;SYNCER_REV.*;SYNCER_REV \"${SYNCER_REV}\";" GITSHA=$(git log -n1 --pretty='%h') if git describe --exact-match --tags "${GITSHA}"; then @@ -261,10 +260,11 @@ if [ "$LINT" == "1" ]; then fi # we utilize https://developer.github.com/v3/repos/ to get the newest release of the arangodb starter: -curl -s https://api.github.com/repos/arangodb-helper/arangodb/releases | \ +STARTER_REV=$(curl -s https://api.github.com/repos/arangodb-helper/arangodb/releases | \ grep tag_name | \ head -n 1 | \ - ${SED} -e "s;.*: ;;" -e 's;";;g' -e 's;,;;' > STARTER_REV + ${SED} -e "s;.*: ;;" -e 's;";;g' -e 's;,;;') +sed -i VERSIONS -e "s;STARTER_REV.*;STARTER_REV \"${STARTER_REV}\";" git add -f \ README \ @@ -276,8 +276,7 @@ git add -f \ lib/Basics/voc-errors.cpp \ js/common/bootstrap/errors.js \ CMakeLists.txt \ - STARTER_REV \ - SYNCER_REV + VERSIONS if [ "$EXAMPLES" == "1" ]; then echo "EXAMPLES" diff --git a/VERSIONS b/VERSIONS index 54b6742125..7edc6b9366 100644 --- a/VERSIONS +++ b/VERSIONS @@ -1,7 +1,9 @@ +STARTER_REV "latest" +SYNCER_REV "latest" GSEARCH_ID_HTTP "010085642145132923492:fixi4yzeiz8" GSEARCH_ID_AQL "010085642145132923492:6ymjhhr677k" GSEARCH_ID_Manual "010085642145132923492:djexw6vlsgo" GSEARCH_ID_Cookbook "010085642145132923492:nknyifjn7tu" GCHANGE_FREQ "daily" GPRIORITY "0.3" -BROWSEABLE_VERSIONS "'devel', '3.2', '3.1', '3.0', '2.8'" +BROWSEABLE_VERSIONS "'devel', '3.2', '3.1', '3.0', '2.8'" \ No newline at end of file