Permalink
Browse files

Merge pull request #97 from tabletcorry/rpm-target-version

Remove dashes from the version in rpm targets
  • Loading branch information...
2 parents 068f7cd + dccf79e commit 16734dac9d8f0f6f0f39556b8cefb184d292d025 @jordansissel committed Sep 2, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/fpm/target/rpm.rb
View
@@ -28,6 +28,16 @@ def url
end
end
+ def version
+ if @version.kind_of?(String) and @version.include?("-")
+ @logger.info("Package version '#{@version}' includes dashes, converting" \
+ " to underscores")
+ @version = @version.gsub(/-/, "_")
+ end
+
+ return @version
+ end
+
def build!(params)
raise "No package name given. Can't assemble package" if !@name
# TODO(sissel): Abort if 'rpmbuild' tool not found.

0 comments on commit 16734da

Please sign in to comment.