Compare commits
No commits in common. "d4013caab1f9bf931362fd67e4512998a465125a" and "a3add50d421897d607101cfca77247edc32ca4bb" have entirely different histories.
d4013caab1
...
a3add50d42
6 changed files with 3 additions and 73 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -7,7 +7,3 @@
|
||||||
.vagrant
|
.vagrant
|
||||||
bin
|
bin
|
||||||
lib
|
lib
|
||||||
debian/.debhelper/
|
|
||||||
debian/debhelper-build-stamp
|
|
||||||
debian/mfm
|
|
||||||
debian/mfm.substvars
|
|
||||||
|
|
19
build.sh
19
build.sh
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# References:
|
|
||||||
# - https://www.debian.org/doc/manuals/maint-guide/build.en.html for base principles
|
|
||||||
# - https://www.patreon.com/posts/building-debian-23177439 for debuild output dir
|
|
||||||
#
|
|
||||||
set -ue
|
|
||||||
|
|
||||||
mkdir -p _build || true
|
|
||||||
|
|
||||||
docker build -t debbuilder --file docker/Dockerfile .
|
|
||||||
docker run -it -v "$(pwd):/app" -v "$(pwd)/_build:/_build" debbuilder \
|
|
||||||
sh -c "ARTIFACTS_DIR=/app/_build debuild --preserve-envvar=ARTIFACTS_DIR -us -uc --buildinfo-option=-u/app/_build --changes-option=-u/app/_build" \
|
|
||||||
|| docker run -it -v "$(pwd):/app" debbuilder
|
|
||||||
|
|
||||||
# dpkg-buildpackage -us -uc
|
|
||||||
# debuild
|
|
||||||
# git-buildpackage
|
|
||||||
echo SUCCESS
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -2,7 +2,7 @@ Source: mfm
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Glenn Y. Rolland <glenux@glenux.net>
|
Maintainer: Glenn Y. Rolland <glenux@glenux.net>
|
||||||
Build-Depends: debhelper-compat (= 13), crystal, shards, make, libyaml-dev
|
Build-Depends: debhelper-compat (= 13), crystal, shards, make
|
||||||
Standards-Version: 4.6.0
|
Standards-Version: 4.6.0
|
||||||
Homepage: https://code.apps.glenux.net/glenux/mfm
|
Homepage: https://code.apps.glenux.net/glenux/mfm
|
||||||
Vcs-Git: https://code.apps.glenux.net/glenux/mfm.git
|
Vcs-Git: https://code.apps.glenux.net/glenux/mfm.git
|
||||||
|
|
2
debian/files
vendored
2
debian/files
vendored
|
@ -1,2 +0,0 @@
|
||||||
mfm-dbgsym_0.2.0_amd64.deb debug optional automatic=yes
|
|
||||||
mfm_0.2.0_amd64.deb utils optional
|
|
|
@ -1,22 +0,0 @@
|
||||||
FROM debian:trixie
|
|
||||||
|
|
||||||
RUN set -ex \
|
|
||||||
&& sed -i \
|
|
||||||
-e 's/Types: deb/Types: deb deb-src/g' \
|
|
||||||
/etc/apt/sources.list.d/debian.sources \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
build-essential \
|
|
||||||
cdbs \
|
|
||||||
devscripts \
|
|
||||||
equivs \
|
|
||||||
fakeroot \
|
|
||||||
crystal \
|
|
||||||
shards \
|
|
||||||
git-buildpackage \
|
|
||||||
libyaml-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
|
@ -94,34 +94,11 @@ module GX
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
## PASS 1
|
|
||||||
file_data = File.read(config_path)
|
file_data = File.read(config_path)
|
||||||
file_patched = Crinja.render(
|
file_patched = Crinja.render(file_data, {"env" => ENV.to_h})
|
||||||
file_data,
|
|
||||||
{
|
|
||||||
"env" => ENV.to_h,
|
|
||||||
"mfm" => {
|
|
||||||
"global" => {"mount_point_base" => "" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
root = Models::RootConfig.from_yaml(file_patched)
|
|
||||||
|
|
||||||
mount_point_base_safe = root.global.mount_point_base
|
|
||||||
raise Models::InvalidMountpointError.new("Invalid global mount point") if mount_point_base_safe.nil?
|
|
||||||
|
|
||||||
## PASS 2
|
|
||||||
file_patched = Crinja.render(
|
|
||||||
file_data,
|
|
||||||
{
|
|
||||||
"env" => ENV.to_h,
|
|
||||||
"mfm" => {
|
|
||||||
"global" => {"mount_point_base" => mount_point_base_safe }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
root = Models::RootConfig.from_yaml(file_patched)
|
root = Models::RootConfig.from_yaml(file_patched)
|
||||||
|
|
||||||
mount_point_base_safe = root.global.mount_point_base
|
mount_point_base_safe = root.global.mount_point_base
|
||||||
raise Models::InvalidMountpointError.new("Invalid global mount point") if mount_point_base_safe.nil?
|
raise Models::InvalidMountpointError.new("Invalid global mount point") if mount_point_base_safe.nil?
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue