use tar instead of individual artifacts
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
76726f9c3b
commit
a3c1e1e98a
15
build.sh
15
build.sh
@ -2,9 +2,8 @@
|
||||
##########################################################################
|
||||
|
||||
DIST=$(cat /dist)
|
||||
ARTIFACTS=( 'bird' 'birdc' 'birdcl' )
|
||||
VERSION=$(grep '^Version:' misc/bird.spec | cut -d' ' -f2)
|
||||
URLT="https://git.burble.dn42/api/packages/burble/generic/bird/${VERSION}/%s"
|
||||
URL="https://git.burble.dn42/api/packages/burble.dn42/generic/bird/${VERSION}/"
|
||||
|
||||
echo "Building bird $VERSION for $DIST"
|
||||
|
||||
@ -31,13 +30,11 @@ fi
|
||||
# build it
|
||||
make -j2 2>&1 | tee build.out
|
||||
|
||||
# push artifacts to gitea
|
||||
for artifact in "${ARTIFACTS[@]}"
|
||||
do
|
||||
echo "Uploading $artifact ..."
|
||||
url=$(printf "$URLT" "${DIST}.${artifact}")
|
||||
curl --user "burble:${TOKEN}" --upload-file "${artifact}" "$url"
|
||||
done
|
||||
# tar and push artifacts to gitea
|
||||
tar="bird.${DIST}.tar.gz"
|
||||
tar -cvzf "$tar" bird birdc birdcl
|
||||
|
||||
curl --user "burble:${TOKEN}" --upload-file "$tar" "${URL}/${tar}"
|
||||
|
||||
echo "All done"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user