From 46829bcc69b6428640b2174972d653965e9cd865 Mon Sep 17 00:00:00 2001 From: Glenn Date: Sat, 18 Nov 2023 23:55:13 +0100 Subject: [PATCH] feat: extract version number from shard+git history --- shard.lock | 4 ++++ shard.yml | 4 +++- src/cli.cr | 3 +-- src/version.cr | 8 ++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 src/version.cr diff --git a/shard.lock b/shard.lock index c0f0724..e13838b 100644 --- a/shard.lock +++ b/shard.lock @@ -8,3 +8,7 @@ shards: git: https://github.com/sztheory/shellwords-crystal.git version: 0.1.0 + version_from_shard: + git: https://github.com/hugopl/version_from_shard.git + version: 1.2.5 + diff --git a/shard.yml b/shard.yml index 746f2c8..13a290e 100644 --- a/shard.yml +++ b/shard.yml @@ -5,7 +5,7 @@ # Copyright © 2023 Glenn Y. Rolland name: Minimalist FUSE Manager -version: 0.1.0 +version: 0.1.10 targets: mfm: @@ -22,6 +22,8 @@ dependencies: github: straight-shoota/crinja shellwords: github: szTheory/shellwords-crystal + version_from_shard: + github: hugopl/version_from_shard # dependencies: # pg: diff --git a/src/cli.cr b/src/cli.cr index 48b3393..f9a6578 100644 --- a/src/cli.cr +++ b/src/cli.cr @@ -6,10 +6,9 @@ require "option_parser" require "./config" require "./fzf" +require "./version" module GX - VERSION="v0.1.9" - class Cli Log = ::Log.for("cli") diff --git a/src/version.cr b/src/version.cr new file mode 100644 index 0000000..89bd308 --- /dev/null +++ b/src/version.cr @@ -0,0 +1,8 @@ + +require "version_from_shard" + +module GX + VersionFromShard.declare +end + +