}
calculate_go_package_version() {
+ # $__returnvar has the nameref attribute set, which means it is a reference
+ # to another variable that is passed in as the first argument to this function.
+ # see https://www.gnu.org/software/bash/manual/html_node/Shell-Parameters.html
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)"
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)
return 1
fi
- go get -ldflags "-X main.version=${go_package_version}" "git.curoverse.com/arvados.git/$src_path"
+ go get -ldflags "-X git.curoverse.com/arvados.git/lib/cmd.version=${go_package_version} -X main.version=${go_package_version}" "git.curoverse.com/arvados.git/$src_path"
local -a switches=()
systemd_unit="$WORKSPACE/${src_path}/${prog}.service"
done
}
+rails_package_version() {
+ local pkgname="$1"; shift
+ if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then
+ echo "$ARVADOS_BUILDING_VERSION"
+ return
+ fi
+ local version="$(version_from_git)"
+ if [ $pkgname = "arvados-api-server" -o $pkgname = "arvados-workbench" ] ; then
+ local P="$PWD"
+ cd $WORKSPACE
+ local arvados_server_version
+ calculate_go_package_version arvados_server_version cmd/arvados-server
+ cd $P
+ if [ $arvados_server_version > $version ] ; then
+ version=$arvados_server_version
+ fi
+ fi
+ echo $version
+}
+
test_rails_package_presence() {
local pkgname="$1"; shift
local srcdir="$1"; shift
cd $srcdir
- local version="$(version_from_git)"
+ local version="$(rails_package_version $pkgname)"
cd $tmppwd
set +e
trap 'set -e' RETURN
fi
+ # $__returnvar has the nameref attribute set, which means it is a reference
+ # to another variable that is passed in as the first argument to this function.
+ # see https://www.gnu.org/software/bash/manual/html_node/Shell-Parameters.html
local -n __returnvar="$1"; shift
local pkgname="$1"; shift
local version="$1"; shift
# 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
repo_subdir=${pkgname:0:1}
fi
- repo_pkg_list=$(curl -s -o - http://apt.arvados.org/pool/${D}/main/${repo_subdir}/)
- echo ${repo_pkg_list} |grep -q ${full_pkgname}
+ repo_pkg_list=$(curl -s -o - http://apt.arvados.org/pool/${D}-dev/main/${repo_subdir}/${pkgname}/)
+ echo "${repo_pkg_list}" |grep -q ${full_pkgname}
if [ $? -eq 0 ] ; then
echo "Package $full_pkgname exists upstream, not rebuilding, downloading instead!"
- curl -s -o "$WORKSPACE/packages/$TARGET/${full_pkgname}" http://apt.arvados.org/pool/${D}/main/${repo_subdir}/${full_pkgname}
+ curl -s -o "$WORKSPACE/packages/$TARGET/${full_pkgname}" http://apt.arvados.org/pool/${D}-dev/main/${repo_subdir}/${pkgname}/${full_pkgname}
return 1
elif test -f "$WORKSPACE/packages/$TARGET/processed/${full_pkgname}" ; then
echo "Package $full_pkgname exists, not rebuilding!"
local srcdir="$1"; shift
cd "$srcdir"
local license_path="$1"; shift
- local version="$(version_from_git)"
+ local version="$(rails_package_version $pkgname)"
echo "$version" >package-build.version
local scripts_dir="$(mktemp --tmpdir -d "$pkgname-XXXXXXXX.scripts")" && \
(