Files
packages/.github/workflows/mg.sh
T
madomado 2f38a7c601 fix(ci): mg (#362)
* fix(ci): mg

* fix: version + release (?)

Signed-off-by: madomado <wboy111@outlook.com>

* fix: rel

Signed-off-by: madomado <wboy111@outlook.com>

---------

Signed-off-by: madomado <wboy111@outlook.com>
2023-04-08 00:54:52 -07:00

17 lines
655 B
Bash
Executable File

if $1; then
dirs=$2
dirs=${dirs/\/pkg/}
export p="{\"id\":\"$5\",\"ver\":\"%v\",\"rel\":\"%r\",\"arch\":\"$4\",\"dirs\":\"$dirs\"}"
else
export p="{\"id\":\"$5\",\"ver\":\"%v\",\"rel\":\"%r\",\"arch\":\"$4\"}"
fi
for f in anda-build/rpm/rpms/*; do
n=$(lesspipe.sh $f | grep -E "Name\s*: " | sed "s@Name\s*: @@")
v=$(lesspipe.sh $f | grep -E "Version\s*: " | sed "s@Version\s*: @@")
r=$(lesspipe.sh $f | grep -E "Release\s*: " | sed "s@Release\s*: @@")
d=${p/\%v/$v}
d=${d/\%r/$r}
curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci/terra$3/builds/$n -X PUT -H "Content-Type: application/json" -d $d --fail-with-body &
done
wait