Compare commits
No commits in common. "d9db2380d9562ea495a1ed16b0f97c17b4094570" and "576b7c62c67b7753120f57b36ba558a0c0dcff0d" have entirely different histories.
d9db2380d9
...
576b7c62c6
4 changed files with 4 additions and 21 deletions
11
.drone.yml
11
.drone.yml
|
@ -5,7 +5,7 @@ name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build:binary
|
- name: build:binary
|
||||||
image: crystallang/crystal:1.10.1-alpine
|
image: crystallang/crystal:1.7.3
|
||||||
environment:
|
environment:
|
||||||
PACKAGE_BASENAME: mfm_linux_amd64
|
PACKAGE_BASENAME: mfm_linux_amd64
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -13,16 +13,11 @@ steps:
|
||||||
path: /_cache
|
path: /_cache
|
||||||
commands:
|
commands:
|
||||||
- pwd
|
- pwd
|
||||||
# - |
|
- apt-get update &&
|
||||||
# apt-get update && \
|
apt-get install -y cmake g++ libevent-dev libpcre3-dev libyaml-dev
|
||||||
# apt-get install -y \
|
|
||||||
# cmake g++ \
|
|
||||||
# libevent-dev libpcre3-dev \
|
|
||||||
# libyaml-dev liblzma-dev
|
|
||||||
- shards install
|
- shards install
|
||||||
- shards build --production --static
|
- shards build --production --static
|
||||||
- strip bin/mfm
|
- strip bin/mfm
|
||||||
- ./bin/mfm --version
|
|
||||||
- mkdir -p /_cache/bin
|
- mkdir -p /_cache/bin
|
||||||
- cp -r bin/mfm /_cache/bin/$PACKAGE_BASENAME
|
- cp -r bin/mfm /_cache/bin/$PACKAGE_BASENAME
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
version: 2.0
|
version: 2.0
|
||||||
shards:
|
shards:
|
||||||
crinja:
|
|
||||||
git: https://github.com/straight-shoota/crinja.git
|
|
||||||
version: 0.8.1
|
|
||||||
|
|
||||||
shellwords:
|
shellwords:
|
||||||
git: https://github.com/sztheory/shellwords-crystal.git
|
git: https://github.com/sztheory/shellwords-crystal.git
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
|
|
@ -18,8 +18,6 @@ targets:
|
||||||
# Short description of gx-vault
|
# Short description of gx-vault
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
crinja:
|
|
||||||
github: straight-shoota/crinja
|
|
||||||
shellwords:
|
shellwords:
|
||||||
github: szTheory/shellwords-crystal
|
github: szTheory/shellwords-crystal
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
# 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>
|
||||||
|
|
||||||
require "crinja"
|
|
||||||
|
|
||||||
require "./filesystems"
|
require "./filesystems"
|
||||||
|
|
||||||
module GX
|
module GX
|
||||||
|
@ -83,11 +81,7 @@ module GX
|
||||||
end
|
end
|
||||||
|
|
||||||
private def load_filesystems(config_path : String)
|
private def load_filesystems(config_path : String)
|
||||||
file_data = File.read(config_path)
|
yaml_data = YAML.parse(File.read(config_path))
|
||||||
# FIXME: render template on a value basis (instead of global)
|
|
||||||
file_patched = Crinja.render(file_data, {"env" => ENV.to_h})
|
|
||||||
|
|
||||||
yaml_data = YAML.parse(file_patched)
|
|
||||||
vaults_data = yaml_data["filesystems"].as_a
|
vaults_data = yaml_data["filesystems"].as_a
|
||||||
|
|
||||||
vaults_data.each do |filesystem_data|
|
vaults_data.each do |filesystem_data|
|
||||||
|
|
Loading…
Add table
Reference in a new issue