Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2a5b6d220 | ||
|
|
3a77cb5e69 | ||
|
|
b0001accd5 | ||
|
|
067247c1bf | ||
|
|
a87709d76c | ||
|
|
1471aa11dc | ||
|
|
4c7a08f8d9 |
16
build.sh
16
build.sh
@@ -15,3 +15,19 @@ cp -r etc ${name}_${version}_all/;
|
|||||||
cp -r usr ${name}_${version}_all/;
|
cp -r usr ${name}_${version}_all/;
|
||||||
|
|
||||||
dpkg-deb --build --root-owner-group ${name}_${version}_all
|
dpkg-deb --build --root-owner-group ${name}_${version}_all
|
||||||
|
|
||||||
|
# Successful build
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
RELEASE_ID=$(curl -s -H "Authorization: token ${GIT_TOKEN}" \
|
||||||
|
"https://git.unblue.uk/api/v1/repos/Unblue/${name}/releases/tags/v${version}" | jq '.id')
|
||||||
|
|
||||||
|
if [ "$RELEASE_ID" != "null" ]; then
|
||||||
|
# Push release
|
||||||
|
curl -X POST "https://git.unblue.uk/api/v1/repos/Unblue/${name}/releases/${RELEASE_ID}/assets" \
|
||||||
|
-H "Authorization: token ${GIT_TOKEN}" \
|
||||||
|
-H "Content-Type: multipart/form-data" \
|
||||||
|
-F "attachment=@${name}_${version}_all.deb"
|
||||||
|
else
|
||||||
|
echo "WARNING! No release ID. Build successful, but will NOT push release to repository".
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user