chore: Update Drone CI configuration for deb package uploads
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Glenn Y. Rolland 2024-12-30 11:18:05 +01:00
parent 744ef5daf1
commit a3add50d42
2 changed files with 26 additions and 17 deletions

View file

@ -69,12 +69,13 @@ steps:
curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \ curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
--upload-file "/_cache/bin/$PACKAGE_BASENAME" \ --upload-file "/_cache/bin/$PACKAGE_BASENAME" \
"$PACKAGE_UPLOAD_URL/$DRONE_TAG/$PACKAGE_BASENAME" "$PACKAGE_UPLOAD_URL/$DRONE_TAG/$PACKAGE_BASENAME"
# - | - |
# for deb in /_cache/bin/*.deb; do for deb in /_cache/bin/*.deb 0 ; do \
# curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \ test -f "$deb" || continue ; \
# --upload-file "$deb" \ curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
# "$PACKAGE_UPLOAD_URL/$DRONE_TAG/$(basename $deb)" --upload-file "$deb" \
# done "$PACKAGE_UPLOAD_URL/$DRONE_TAG/$(basename $deb)" ; \
done
- | - |
set -x set -x
curl -X POST \ curl -X POST \
@ -100,16 +101,17 @@ steps:
-H "Content-Type: multipart/form-data" \ -H "Content-Type: multipart/form-data" \
-F "attachment=@/_cache/bin/$PACKAGE_BASENAME" \ -F "attachment=@/_cache/bin/$PACKAGE_BASENAME" \
"$RELEASES_URL/$TAG_ID/assets?name=$PACKAGE_BASENAME" "$RELEASES_URL/$TAG_ID/assets?name=$PACKAGE_BASENAME"
# - | - |
# set -x set -x
# for deb in /_cache/bin/*.deb; do for deb in /_cache/bin/*.deb 0 ; do \
# curl -X POST \ test -f "$deb" || continue ; \
# -H "Authorization: token $RELEASE_UPLOAD_TOKEN" \ curl -X POST \
# -H "accept: application/json" \ -H "Authorization: token $RELEASE_UPLOAD_TOKEN" \
# -H "Content-Type: multipart/form-data" \ -H "accept: application/json" \
# -F "attachment=@$deb" \ -H "Content-Type: multipart/form-data" \
# "$RELEASES_URL/$TAG_ID/assets?name=$(basename $deb)" -F "attachment=@$deb" \
# done "$RELEASES_URL/$TAG_ID/assets?name=$(basename $deb)" ; \
done
# FIXME: handle multi-arch # FIXME: handle multi-arch

View file

@ -6,11 +6,14 @@
DESTDIR= DESTDIR=
PREFIX=$(DESTDIR)/usr PREFIX=$(DESTDIR)/usr
.PHONY: all
all: build all: build
.PHONY: prepare
prepare: prepare:
shards install shards install
.PHONY: build
build: build:
shards build --error-trace -Dpreview_mt shards build --error-trace -Dpreview_mt
@echo SUCCESS @echo SUCCESS
@ -18,10 +21,12 @@ build:
watch: watch:
watchexec --restart --delay-run 3 -c -e cr make build watchexec --restart --delay-run 3 -c -e cr make build
.PHONY: spec test
spec: test spec: test
test: test:
crystal spec --error-trace crystal spec --error-trace
.PHONY: install
install: install:
install \ install \
-D \ -D \
@ -29,5 +34,7 @@ install:
bin/mfm \ bin/mfm \
$(PREFIX)/bin/mfm $(PREFIX)/bin/mfm
.PHONY: spec test build all prepare install .PHONY: deb
deb:
dpkg-buildpackage -us -uc -d