Compare commits
No commits in common. "feature/11-add-debian-packaging" and "develop" have entirely different histories.
feature/11
...
develop
8 changed files with 6 additions and 91 deletions
37
.drone.yml
37
.drone.yml
|
@ -26,24 +26,6 @@ steps:
|
||||||
- mkdir -p /_cache/bin
|
- mkdir -p /_cache/bin
|
||||||
- cp -r bin/mfm /_cache/bin/$PACKAGE_BASENAME
|
- cp -r bin/mfm /_cache/bin/$PACKAGE_BASENAME
|
||||||
|
|
||||||
- name: build:debian
|
|
||||||
image: debian:bullseye
|
|
||||||
environment:
|
|
||||||
PACKAGE_BASENAME: mfm_linux_amd64
|
|
||||||
volumes:
|
|
||||||
- name: cache
|
|
||||||
path: /_cache
|
|
||||||
commands:
|
|
||||||
- apt-get update
|
|
||||||
- apt-get install -y build-essential debhelper devscripts dh-make
|
|
||||||
- curl -fsSL https://crystal-lang.org/install.sh | bash
|
|
||||||
- mkdir -p /_cache/debian
|
|
||||||
- mkdir -p /_cache/bin
|
|
||||||
- cp -r * /_cache/debian
|
|
||||||
- cd /_cache/debian
|
|
||||||
- dpkg-buildpackage -us -uc -d
|
|
||||||
- mv ../*.deb /_cache/bin
|
|
||||||
|
|
||||||
- name: publish:tag
|
- name: publish:tag
|
||||||
image: alpine
|
image: alpine
|
||||||
environment:
|
environment:
|
||||||
|
@ -64,18 +46,10 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- apk add --update --no-cache curl jq
|
- apk add --update --no-cache curl jq
|
||||||
- env |grep DRONE
|
- env |grep DRONE
|
||||||
# Upload packages
|
|
||||||
- |
|
- |
|
||||||
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 0 ; do \
|
|
||||||
test -f "$deb" || continue ; \
|
|
||||||
curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
|
|
||||||
--upload-file "$deb" \
|
|
||||||
"$PACKAGE_UPLOAD_URL/$DRONE_TAG/$(basename $deb)" ; \
|
|
||||||
done
|
|
||||||
- |
|
- |
|
||||||
set -x
|
set -x
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
|
@ -101,17 +75,6 @@ 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
|
|
||||||
for deb in /_cache/bin/*.deb 0 ; do \
|
|
||||||
test -f "$deb" || continue ; \
|
|
||||||
curl -X POST \
|
|
||||||
-H "Authorization: token $RELEASE_UPLOAD_TOKEN" \
|
|
||||||
-H "accept: application/json" \
|
|
||||||
-H "Content-Type: multipart/form-data" \
|
|
||||||
-F "attachment=@$deb" \
|
|
||||||
"$RELEASES_URL/$TAG_ID/assets?name=$(basename $deb)" ; \
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
# FIXME: handle multi-arch
|
# FIXME: handle multi-arch
|
||||||
|
|
17
Makefile
17
Makefile
|
@ -3,17 +3,13 @@
|
||||||
# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland <glenux@glenux.net>
|
# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland <glenux@glenux.net>
|
||||||
# Copyright © 2023 Glenn Y. Rolland <glenux@glenux.net>
|
# Copyright © 2023 Glenn Y. Rolland <glenux@glenux.net>
|
||||||
|
|
||||||
DESTDIR=
|
PREFIX=/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
|
||||||
|
@ -21,20 +17,15 @@ 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 \
|
|
||||||
-m 755 \
|
-m 755 \
|
||||||
bin/mfm \
|
bin/code-preloader \
|
||||||
$(PREFIX)/bin/mfm
|
$(PREFIX)/bin
|
||||||
|
|
||||||
.PHONY: deb
|
.PHONY: spec test build all prepare install
|
||||||
deb:
|
|
||||||
dpkg-buildpackage -us -uc -d
|
|
||||||
|
|
||||||
|
|
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -1,5 +0,0 @@
|
||||||
mfm (0.2.0) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Première version empaquetée pour Debian.
|
|
||||||
|
|
||||||
-- Glenn Y. Rolland <glenux@glenux.net> Sun, 29 Dec 2024 20:06:16 +0100
|
|
19
debian/control
vendored
19
debian/control
vendored
|
@ -1,19 +0,0 @@
|
||||||
Source: mfm
|
|
||||||
Section: utils
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Glenn Y. Rolland <glenux@glenux.net>
|
|
||||||
Build-Depends: debhelper-compat (= 13), crystal, shards, make
|
|
||||||
Standards-Version: 4.6.0
|
|
||||||
Homepage: https://code.apps.glenux.net/glenux/mfm
|
|
||||||
Vcs-Git: https://code.apps.glenux.net/glenux/mfm.git
|
|
||||||
Vcs-Browser: https://code.apps.glenux.net/glenux/mfm
|
|
||||||
|
|
||||||
Package: mfm
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libpcre3, libevent-2.1-7, fzf
|
|
||||||
Recommends: gocryptfs, httpdirfs, sshfs
|
|
||||||
Description: Simple command-line helper for FUSE filesystems
|
|
||||||
MFM is a Crystal-lang CLI designed to streamline the management of various
|
|
||||||
FUSE filesystems, such as sshfs, gocryptfs, httpdirfs, and more. Through its
|
|
||||||
user-friendly interface, users can effortlessly mount and unmount filesystems,
|
|
||||||
get real-time filesystem status, and handle errors proficiently.
|
|
8
debian/copyright
vendored
8
debian/copyright
vendored
|
@ -1,8 +0,0 @@
|
||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: my-crystal-app
|
|
||||||
Source: https://code.apps.glenux.net/glenux/mfm
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 2024, Glenn Y. Rolland <glenux@glenux.net>
|
|
||||||
License: MIT
|
|
||||||
https://opensource.org/license/mit
|
|
3
debian/mfm.install
vendored
3
debian/mfm.install
vendored
|
@ -1,3 +0,0 @@
|
||||||
bin/mfm /usr/bin/
|
|
||||||
README.md /usr/share/doc/mfm/
|
|
||||||
LICENSES/GPL-3.0-or-later.txt /usr/share/doc/mfm/LICENSE
|
|
4
debian/rules
vendored
4
debian/rules
vendored
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@
|
|
|
@ -37,10 +37,10 @@ describe GX::Utils::BreadCrumbs do
|
||||||
b1.to_s.should eq("")
|
b1.to_s.should eq("")
|
||||||
|
|
||||||
b2 = b1 + "test1"
|
b2 = b1 + "test1"
|
||||||
b2.to_s.should eq("test1")
|
b2.to_a.should eq("test1")
|
||||||
|
|
||||||
b3 = b2 + "test2"
|
b3 = b2 + "test2"
|
||||||
b3.to_s.should eq("test1 test2")
|
b3.to_a.should eq("test1 test2")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue