qrpm 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/qrpm +7 -3
- data/lib/qrpm/version.rb +1 -1
- data/lib/qrpm.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69442a72ca837b3c52ffbda68a8859a7591cb626ce919f583bf7e39f116cc4ef
|
4
|
+
data.tar.gz: 6d08a9ed16af1b3c8f9a6afe9d1d31958a78dc8d7ce19638039abac01ef9642f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
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",
|