qrpm 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/exe/qrpm +7 -3
  3. data/lib/qrpm/version.rb +1 -1
  4. data/lib/qrpm.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85d9882ee64a9c241212a8c7d83b0cb8c326ee64c1dcb53bf0950c216d41c868
4
- data.tar.gz: 877340a9c37016f4e8c5750dab7600250ed1a0a677d83e914104c0358e97587e
3
+ metadata.gz: 69442a72ca837b3c52ffbda68a8859a7591cb626ce919f583bf7e39f116cc4ef
4
+ data.tar.gz: 6d08a9ed16af1b3c8f9a6afe9d1d31958a78dc8d7ce19638039abac01ef9642f
5
5
  SHA512:
6
- metadata.gz: fa2a874c63f91d7d00df124413ddc2c85495031e6f73c577b3892ca4ec18f4794a548aed99a41fca307c3f5f79b200166d52fb1e2439d29304720a890494ed9d
7
- data.tar.gz: 677aceb85dcfc033f83df21a3bc1b8b501747855f3d42dfbf75b5c6dfea7bfc5eb9e26592a4261e751d1b461d75d23e1c1b7c5f547da0b86d38423f5e8ae8c49
6
+ metadata.gz: 45fafccf06fb93ff1933ab932022421ad1952df731b7133bb831f8a3cedd303787fc46d82222f98c2b9845c3d5ed090ae8afdb075f24a4eb376b8f675580ad37
7
+ data.tar.gz: c4a3d9c6f372de9e4fccb67af861aea6bc2529dccced89bd3028e2a46dcf122b16f01a9075c0981a7543e456fe90d2ed5504be02c7da532af78923bf744608fa
data/exe/qrpm CHANGED
@@ -126,6 +126,10 @@ begin
126
126
  currdir = overrides["currdir"] = File.expand_path(overrides["currdir"] || Dir.getwd)
127
127
  qrpmdir = overrides["qrpmdir"] = File.expand_path(overrides["qrpmdir"] || opts.directory || ".")
128
128
 
129
+ # Check builddir (todo: also currdir?)
130
+ File.directory?(currdir) or error "Can't find '#{currdir}'"
131
+ File.directory?(qrpmdir) or error "Can't find '#{qrpmdir}'"
132
+
129
133
  # Compute builddir
130
134
  if opts.builddir? && opts.force_builddir?
131
135
  ShellOpts.error "Can't use both --builddir and --force-builddir"
@@ -139,7 +143,7 @@ begin
139
143
  end
140
144
 
141
145
  # Check if repository is clean
142
- opts.force? || opts.dump? || `git status --porcelain | grep -v '??' 2>/dev/null` == "" or
146
+ opts.force? || opts.dump? || `cd #{qrpmdir}; git status --porcelain | grep -v '??' 2>/dev/null` == "" or
143
147
  ShellOpts.error "Repository is dirty"
144
148
 
145
149
  # Check configuration file
@@ -156,8 +160,8 @@ begin
156
160
  Dir.chdir(qrpmdir)
157
161
 
158
162
  # Parse QRPM configuration file. Include paths are still resolved with the
159
- # context of the original directory while filesystem paths are relative to
160
- # the source directory
163
+ # context of the original directory if -C is used while filesystem paths are
164
+ # relative to the source directory
161
165
  compiler = Qrpm::Compiler.new(overrides)
162
166
  qrpm = compiler.compile(conf)
163
167
  rpm = qrpm.rpm
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.3"
4
+ VERSION = "0.3.4"
5
5
  end
data/lib/qrpm.rb CHANGED
@@ -102,7 +102,7 @@ module Qrpm
102
102
  DEFAULTS = {
103
103
  "name" => "$(basename $PWD)",
104
104
  "summary" => "The $name RPM package",
105
- "version" => "$(cd ${{srcdir}} && git tag -l 2>/dev/null | tail -1 | tr -dc '.0-9' || echo 0.0.0)",
105
+ "version" => "$(cd ${{srcdir}} && git tag -l 2>/dev/null | sort -V | tail -1 | tr -dc '.0-9' || echo 0.0.0)",
106
106
  "description" => "$summary",
107
107
  "release" => "1",
108
108
  "license" => "GPL",
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.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen