X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f763868dd1202328576e4b393b71bb584190ee39..ba15fa5da21f4bafd3f90a8d259ea2aae764c77e:/build/run-build-packages-one-target.sh diff --git a/build/run-build-packages-one-target.sh b/build/run-build-packages-one-target.sh index cf60b5e2d9..c981b2a9ef 100755 --- a/build/run-build-packages-one-target.sh +++ b/build/run-build-packages-one-target.sh @@ -21,8 +21,10 @@ Syntax: Build only a specific package --only-test Test only a specific package ---version - Version to build (default: \$ARVADOS_BUILDING_VERSION or 0.1.timestamp.commithash) +--build-version + Version to build (default: + \$ARVADOS_BUILDING_VERSION-\$ARVADOS_BUILDING_ITERATION or + 0.1.timestamp.commithash) WORKSPACE=path Path to the Arvados source tree to build packages from @@ -47,7 +49,7 @@ if ! [[ -d "$WORKSPACE" ]]; then fi PARSEDOPTS=$(getopt --name "$0" --longoptions \ - help,debug,test-packages,target:,command:,only-test:,only-build:,version: \ + help,debug,test-packages,target:,command:,only-test:,only-build:,build-version: \ -- "" "$@") if [ $? -ne 0 ]; then exit 1 @@ -85,8 +87,16 @@ while [ $# -gt 0 ]; do --test-packages) test_packages=1 ;; - --version) - ARVADOS_BUILDING_VERSION="$2" + --build-version) + if [[ -z "$2" ]]; then + : + elif ! [[ "$2" =~ (.*)-(.*) ]]; then + echo >&2 "FATAL: --build-version '$2' does not include an iteration. Try '${2}-1'?" + exit 1 + else + ARVADOS_BUILDING_VERSION="${BASH_REMATCH[1]}" + ARVADOS_BUILDING_ITERATION="${BASH_REMATCH[2]}" + fi shift ;; --) @@ -101,12 +111,21 @@ done set -e -IFS=- read ARVADOS_BUILDING_VERSION ARVADOS_BUILDING_ITERATION </dev/null + if [[ "$?" != "0" ]]; then + echo >&2 + echo >&2 "Error: please install createrepo. E.g. sudo apt-get install createrepo" + echo >&2 + exit 1 + fi + set -e createrepo $WORKSPACE/packages/$TARGET fi @@ -142,6 +161,7 @@ popd if test -z "$packages" ; then packages="arvados-api-server + arvados-client arvados-docker-cleaner arvados-git-httpd arvados-node-manager @@ -157,14 +177,10 @@ if test -z "$packages" ; then keep-rsync keepstore keep-web - libarvados-perl" - - case "$TARGET" in - *) - packages="$packages python-arvados-fuse - python-arvados-python-client python-arvados-cwl-runner" - ;; - esac + libarvados-perl + python-arvados-fuse + python-arvados-python-client + python-arvados-cwl-runner" fi FINAL_EXITCODE=0