Fix rails package versions for dev builds.
[arvados.git] / build / run-library.sh
index 95f2ff1452c4a4477d5c62be391148802899383f..8857d5b635df803262d3885942794e10adb83430 100755 (executable)
@@ -110,11 +110,8 @@ calculate_go_package_version() {
   local -n __returnvar="$1"; shift
   local src_path="$1"; shift
 
-  mkdir -p "$GOPATH/src/git.curoverse.com"
-  ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
-  (cd "$GOPATH/src/git.curoverse.com/arvados.git" && "$GOPATH/bin/govendor" sync -v)
-
-  cd "$GOPATH/src/git.curoverse.com/arvados.git/$src_path"
+  cd "$WORKSPACE/$src_path"
+  go mod download
   local version="$(version_from_git)"
   local timestamp="$(timestamp_from_git)"
 
@@ -126,7 +123,7 @@ calculate_go_package_version() {
       checkdirs+=(sdk/go lib)
   fi
   for dir in ${checkdirs[@]}; do
-      cd "$GOPATH/src/git.curoverse.com/arvados.git/$dir"
+      cd "$WORKSPACE/$dir"
       ts="$(timestamp_from_git)"
       if [[ "$ts" -gt "$timestamp" ]]; then
           version=$(version_from_git)
@@ -222,7 +219,7 @@ rails_package_version() {
        local arvados_server_version
        calculate_go_package_version arvados_server_version cmd/arvados-server
        cd $P
-       if [ $arvados_server_version > $version ] ; then
+       if [ $arvados_server_version -gt $version ] ; then
            version=$arvados_server_version
        fi
     fi
@@ -319,7 +316,9 @@ test_package_presence() {
     # sure it gets picked up by the test and/or upload steps.
     # Get the list of packages from the repos
 
-    if [[ "$FORMAT" == "deb" ]]; then
+    if [[ "$FORCE_BUILD" == "1" ]]; then
+      echo "Package $full_pkgname build forced with --force-build, building"
+    elif [[ "$FORMAT" == "deb" ]]; then
       declare -A dd
       dd[debian9]=stretch
       dd[debian10]=buster