qrpm 0.3.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/exe/qrpm +15 -0
  3. data/lib/qrpm/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46adf6022a282921ffec7babe5d51a630265fdc006fe6a8f2108b05175d3801f
4
- data.tar.gz: 152bedc386c3b1f80d4727c89bb2eda22aea5f98dec9d4bc505eb7484419e93c
3
+ metadata.gz: 9d468f2efcb7fffda8a4dad3e2476857ab62fa2b00def58c9ffbe8d59f7cc867
4
+ data.tar.gz: 91973e0057876141ede7bb1b1f7b3c5432ff320a25532b47736154c6be2c87a8
5
5
  SHA512:
6
- metadata.gz: 5c97e24da7f3bde2793c624300c93ccd8197cae6f8c204e708663a2549c9c718cbd64f1a741c8a576c0aac65af8bcf9272eb633dafe3ca7def268a92a5bae73a
7
- data.tar.gz: aab20b330f1968edeac8e4eeb96ba2a1953cb688f74b8274804d7e9c1b8b53ab023552338b438d13ebcdae32f2cf52837d4a9527284349440d55b7c677450601
6
+ metadata.gz: 2158c236484f1e83f7a77cf53299d675413059be03939a7cd7a7577931c8af0ad56e71bcd07f08541d3e2fe24e2806ef3cc8708a8132b33e36c8176a6a07a2b3
7
+ data.tar.gz: e057e5818b904e1aa4526e66627d6d09f18180ba9185a151926954abf84e5235a21415dd6028c08617bc119cfb4d32a8ea35cdb058a7e718052ceb6165221b08
data/exe/qrpm CHANGED
@@ -138,6 +138,11 @@ begin
138
138
 
139
139
  -d,dump
140
140
  Dump internal data and exit. For debug
141
+
142
+ COMMANDS
143
+ show! -- QRPM-FILE VARIABLE...
144
+ Output the value of a variable. Typically used to extract the version
145
+ number from a qrpm.yml file
141
146
  )
142
147
 
143
148
  opts, args = ShellOpts.process(SPEC, ARGV, verbose: true, quiet: true)
@@ -154,11 +159,14 @@ begin
154
159
  # on the command line
155
160
  overrides = {}
156
161
  file = nil
162
+ show = []
157
163
  while arg = args.extract(0..1)
158
164
  if arg =~ /^(.*?)=(.*)$/
159
165
  overrides[$1] = $2
160
166
  elsif file.nil?
161
167
  file = arg
168
+ elsif opts.subcommand == :show!
169
+ show << arg
162
170
  else
163
171
  args.expect(-1, "More than one file argument")
164
172
  end
@@ -209,6 +217,13 @@ begin
209
217
  qrpm = compiler.compile(conf)
210
218
  rpm = qrpm.rpm
211
219
 
220
+ if opts.subcommand == :show!
221
+ for variable in show
222
+ puts qrpm[variable].sub(/^\/\//, "/")
223
+ end
224
+ exit
225
+ end
226
+
212
227
  if opts.dump?
213
228
  puts "Compiler"
214
229
  indent { compiler.dump }
data/lib/qrpm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Qrpm
4
- VERSION = "0.3.5"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qrpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen