setup_confdirs /etc/arvados "$CONFIG_PATH"
setup_conffile environments/production.rb environments/production.rb.example \
|| true
- setup_conffile application.yml application.yml.example || APPLICATION_READY=0
- if [ -n "$RAILSPKG_DATABASE_LOAD_TASK" ]; then
- setup_conffile database.yml database.yml.example || DATABASE_READY=0
- fi
setup_extra_conffiles
echo "... done."
fi
if [ 11 = "$RAILSPKG_SUPPORTS_CONFIG_CHECK$APPLICATION_READY" ]; then
- run_and_report "Checking application.yml for completeness" \
+ run_and_report "Checking configuration for completeness" \
$COMMAND_PREFIX bundle exec rake config:check || APPLICATION_READY=0
fi
configure_version
fi
-report_not_ready "$DATABASE_READY" "$CONFIG_PATH/database.yml"
if printf '%s\n' "$CONFIG_PATH" | grep -Fqe "sso"; then
report_not_ready "$APPLICATION_READY" "$CONFIG_PATH/application.yml"
+ report_not_ready "$DATABASE_READY" "$CONFIG_PATH/database.yml"
else
report_not_ready "$APPLICATION_READY" "/etc/arvados/config.yml"
fi
--- /dev/null
+#!/bin/bash
+
+set -e -o pipefail
+commit="$1"
+versionglob="[0-9].[0-9]*.[0-9]*"
+
+if ! git describe --exact-match --match "$versionglob" "$commit" 2>/dev/null; then
+ if git merge-base --is-ancestor "$commit" origin/master; then
+ # x.(y+1).0.preTIMESTAMP, where x.y.z is the newest version that does not contain $commit
+ v=$(git tag | grep -vFf <(git tag --contains "$commit") | sort -Vr | head -n1 | perl -pe 's/\.(\d+)\.\d+/".".($1+1).".0"/e')
+ else
+ # x.y.(z+1).preTIMESTAMP, where x.y.z is the latest released ancestor of $commit
+ v=$(git describe --abbrev=0 --match "$versionglob" "$commit" | perl -pe 's/(\d+)$/$1+1/e')
+ fi
+ ts=$(TZ=UTC git log -n1 --format=%cd --date="format-local:%Y%m%d%H%M%S" "$commit")
+ echo "$v.pre$ts"
+fi
case "login", "logout", "auth":
default:
w.Header().Set("Access-Control-Allow-Origin", "*")
- w.Header().Set("Access-Control-Allow-Methods", "GET, HEAD, PUT, POST, DELETE")
+ w.Header().Set("Access-Control-Allow-Methods", "GET, HEAD, PUT, POST, PATCH, DELETE")
w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Type")
w.Header().Set("Access-Control-Max-Age", "86486400")
}
shouldCall: "CollectionList",
withOptions: arvados.ListOptions{Limit: 123, Offset: 456, IncludeTrash: true, IncludeOldVersions: true},
},
+ {
+ method: "POST",
+ path: "/arvados/v1/collections?limit=123",
+ body: `{"offset":456,"include_trash":true,"include_old_versions":true}`,
+ header: http.Header{"X-Http-Method-Override": {"GET"}, "Content-Type": {"application/json"}},
+ shouldCall: "CollectionList",
+ withOptions: arvados.ListOptions{Limit: 123, Offset: 456, IncludeTrash: true, IncludeOldVersions: true},
+ },
{
method: "POST",
path: "/arvados/v1/collections?limit=123",
for _, hdr := range []string{"Authorization", "Content-Type"} {
c.Check(rr.Result().Header.Get("Access-Control-Allow-Headers"), check.Matches, ".*"+hdr+".*")
}
- for _, method := range []string{"GET", "HEAD", "PUT", "POST", "DELETE"} {
+ for _, method := range []string{"GET", "HEAD", "PUT", "POST", "PATCH", "DELETE"} {
c.Check(rr.Result().Header.Get("Access-Control-Allow-Methods"), check.Matches, ".*"+method+".*")
}
exit
end
-git_latest_tag = `git tag -l |sort -V -r |head -n1`
-git_latest_tag = git_latest_tag.encode('utf-8').strip
+version = `#{__dir__}/../../build/version-at-commit.sh HEAD`.encode('utf-8').strip
git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
git_timestamp = Time.at(git_timestamp.to_i).utc
Gem::Specification.new do |s|
s.name = 'arvados-cli'
- s.version = "#{git_latest_tag}.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
+ s.version = version
s.date = git_timestamp.strftime("%Y-%m-%d")
s.summary = "Arvados CLI tools"
s.description = "Arvados command line tools, git commit #{git_hash}"
exit
end
-git_latest_tag = `git tag -l |sort -V -r |head -n1`
-git_latest_tag = git_latest_tag.encode('utf-8').strip
+version = `#{__dir__}/../../build/version-at-commit.sh HEAD`.encode('utf-8').strip
git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
git_timestamp = Time.at(git_timestamp.to_i).utc
Gem::Specification.new do |s|
s.name = 'arvados'
- s.version = "#{git_latest_tag}.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
+ s.version = version
s.date = git_timestamp.strftime("%Y-%m-%d")
s.summary = "Arvados client library"
s.description = "Arvados client library, git commit #{git_hash}"
case "$TARGET" in
centos*)
- fpm_depends+=(libcurl-devel postgresql-devel)
+ fpm_depends+=(libcurl-devel postgresql-devel bison make automake gcc gcc-c++)
;;
debian* | ubuntu*)
- fpm_depends+=(libcurl-ssl-dev libpq-dev g++)
+ fpm_depends+=(libcurl-ssl-dev libpq-dev g++ bison zlib1g-dev make)
;;
esac
exit
end
-git_latest_tag = `git tag -l |sort -V -r |head -n1`
-git_latest_tag = git_latest_tag.encode('utf-8').strip
+version = `#{__dir__}/../../build/version-at-commit.sh HEAD`.encode('utf-8').strip
git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
git_timestamp = Time.at(git_timestamp.to_i).utc
Gem::Specification.new do |s|
s.name = 'arvados-login-sync'
- s.version = "#{git_latest_tag}.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
+ s.version = version
s.date = git_timestamp.strftime("%Y-%m-%d")
s.summary = "Set up local login accounts for Arvados users"
s.description = "Creates and updates local login accounts for Arvados users. Built from git commit #{git_hash}"