mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-14 16:49:10 +00:00
ci: another manifest.json generation attempt
This commit is contained in:
parent
34c4039517
commit
1803cd3c6c
2 changed files with 8 additions and 27 deletions
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
BAZEL=${BAZEL:-bazel}
|
||||
artifacts=$($BAZEL query //src/... 2>/dev/null | grep +publish)
|
||||
publishedServices=${artifacts//$'//src/'/}
|
||||
publishedServices=${publishedServices//$':+publish'/}
|
||||
|
||||
artifactList=$'{ "services": {} }'
|
||||
|
||||
getSha() {
|
||||
service=$1
|
||||
cat ./bazel-bin/src/$service/+publish.digest
|
||||
}
|
||||
|
||||
addShaToServiceList() {
|
||||
service=$1
|
||||
shaSum=$2
|
||||
artifactList=$(echo $artifactList | jq ".services+={\"${service}\":\"${shaSum}\"}")
|
||||
}
|
||||
|
||||
for service in $publishedServices; do
|
||||
shaSum=$(getSha $service)
|
||||
test $shaSum && addShaToServiceList $service $shaSum
|
||||
done
|
||||
|
||||
echo $artifactList | jq
|
Loading…
Add table
Add a link
Reference in a new issue