Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
33 lines
890 B
Bash
Executable File
33 lines
890 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p curl jq common-updater-scripts
|
|
|
|
set -eu -o pipefail
|
|
|
|
attr=olympus-unwrapped
|
|
nix_file=$(nix-instantiate --eval --strict -A "$attr.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/')
|
|
|
|
api() {
|
|
curl -s "https://dev.azure.com/EverestAPI/Olympus/_apis/$1?api-version=7.1"
|
|
}
|
|
|
|
pipeline_id=$(api pipelines | jq -r '
|
|
.value
|
|
| map(select(.name == "EverestAPI.Olympus"))
|
|
| .[0].id
|
|
')
|
|
|
|
run_id=$(api pipelines/$pipeline_id/runs | jq -r '
|
|
.value
|
|
| map(select(.result == "succeeded"))
|
|
| max_by(.finishedDate)
|
|
| .id
|
|
')
|
|
sed -i 's|buildId\s*=\s*".*";|buildId = "'$run_id'";|' $nix_file
|
|
|
|
run=$(api pipelines/$pipeline_id/runs/$run_id)
|
|
commit=$(echo "$run" | jq -r '.resources.repositories.self.version')
|
|
version=$(echo "$run" | jq -r '.name')
|
|
update-source-version $attr $version --rev=$commit
|
|
|
|
"$(nix-build --attr $attr.fetch-deps --no-out-link)"
|