Merge pull request 'Clean up CLI' (#48) from clean-up-cli into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #48
This commit is contained in:
commit
243fe6ceec
|
@ -8,10 +8,6 @@ shards:
|
|||
git: https://github.com/mrrooijen/commander.git
|
||||
version: 0.4.0
|
||||
|
||||
compiled_license:
|
||||
git: https://git.dergrimm.net/dergrimm/compiled_license.git
|
||||
version: 2.0.0
|
||||
|
||||
db:
|
||||
git: https://github.com/crystal-lang/crystal-db.git
|
||||
version: 0.10.1
|
||||
|
@ -80,6 +76,10 @@ shards:
|
|||
git: https://github.com/ysbaddaden/pool.git
|
||||
version: 0.2.4
|
||||
|
||||
pretty:
|
||||
git: https://github.com/maiha/pretty.cr.git
|
||||
version: 1.1.1
|
||||
|
||||
promise:
|
||||
git: https://github.com/spider-gazelle/promise.git
|
||||
version: 3.0.0
|
||||
|
@ -104,6 +104,10 @@ shards:
|
|||
git: https://github.com/spider-gazelle/secrets-env.git
|
||||
version: 1.3.1
|
||||
|
||||
shard:
|
||||
git: https://github.com/maiha/shard.cr.git
|
||||
version: 0.3.1
|
||||
|
||||
version_from_shard:
|
||||
git: https://github.com/hugopl/version_from_shard.git
|
||||
version: 1.2.5
|
||||
|
|
|
@ -34,8 +34,6 @@ dependencies:
|
|||
github: spider-gazelle/secrets-env
|
||||
quartz_mailer:
|
||||
github: amberframework/quartz-mailer
|
||||
version_from_shard:
|
||||
github: hugopl/version_from_shard
|
||||
kilt:
|
||||
github: jeromegn/kilt
|
||||
email:
|
||||
|
@ -50,5 +48,5 @@ dependencies:
|
|||
github: spider-gazelle/crystal-ldap
|
||||
ldap_escape:
|
||||
git: https://git.dergrimm.net/dergrimm/ldap_escape.git
|
||||
compiled_license:
|
||||
git: https://git.dergrimm.net/dergrimm/compiled_license.git
|
||||
shard:
|
||||
github: maiha/shard.cr
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
require "shard"
|
||||
|
||||
module Backend
|
||||
AUTHORS = Shard.authors
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
module Backend
|
||||
LICENSE = {{ read_file "LICENSE" }}
|
||||
end
|
|
@ -1,5 +1,5 @@
|
|||
require "version_from_shard"
|
||||
require "shard"
|
||||
|
||||
module Backend
|
||||
VersionFromShard.declare
|
||||
VERSION = Shard.version
|
||||
end
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require "commander"
|
||||
require "compiled_license"
|
||||
require "../backend"
|
||||
|
||||
cli = Commander::Command.new do |cmd|
|
||||
|
@ -21,12 +20,22 @@ cli = Commander::Command.new do |cmd|
|
|||
end
|
||||
|
||||
cmd.commands.add do |c|
|
||||
c.use = "licenses"
|
||||
c.short = "Prints licenses of projects used"
|
||||
c.use = "authors"
|
||||
c.short = "Prints authors"
|
||||
c.long = c.short
|
||||
|
||||
c.run do
|
||||
puts CompiledLicense::LICENSES
|
||||
puts Backend::AUTHORS.join("\n")
|
||||
end
|
||||
end
|
||||
|
||||
cmd.commands.add do |c|
|
||||
c.use = "license"
|
||||
c.short = "Prints license"
|
||||
c.long = c.short
|
||||
|
||||
c.run do
|
||||
puts Backend::LICENSE
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue