Merge branch '19683-arvbox-rubysdk-fix'. Closes #19683
authorLucas Di Pentima <lucas.dipentima@curii.com>
Wed, 2 Nov 2022 18:20:46 +0000 (15:20 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Wed, 2 Nov 2022 18:20:46 +0000 (15:20 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

tools/arvbox/lib/arvbox/docker/common.sh

index 4e95bdedfc465ac0c3c25065e2dd778f0b949775..ba81426f0bfc35a7b916496970edf0cbb9648300 100644 (file)
@@ -74,6 +74,11 @@ run_bundler() {
        # If present, use the one associated with rails workbench or API
        BUNDLER=$PWD/bin/bundle
     fi
+
+    if test -z "$(flock $GEMLOCK /var/lib/arvados/bin/gem list | grep 'arvados[[:blank:]].*[0-9.]*dev')" ; then
+        (cd /usr/src/arvados/sdk/ruby && \
+        /var/lib/arvados/bin/gem build arvados.gemspec && flock $GEMLOCK /var/lib/arvados/bin/gem install $(ls -1 *.gem | sort -r | head -n1))
+    fi
     if ! flock $GEMLOCK $BUNDLER install --verbose --local --no-deployment $frozen "$@" ; then
         flock $GEMLOCK $BUNDLER install --verbose --no-deployment $frozen "$@"
     fi