Skip to content

Commit

Permalink
Drop leading v from version for Debian
Browse files Browse the repository at this point in the history
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
  • Loading branch information
gliptak authored and jordansissel committed Dec 4, 2022
1 parent db06af3 commit ada6012
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/fpm/package/deb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ def prefix
return (attributes[:prefix] or "/")
end # def prefix

def version
if @version.kind_of?(String) and @version.start_with?("v")
logger.warn("Drop leading v from package version '#{@version}'")
@version = @version.gsub(/^v/, "")
end

return @version
end

def input(input_path)
extract_info(input_path)
extract_files(input_path)
Expand Down Expand Up @@ -1189,5 +1198,5 @@ def data_tar_flags
return data_tar_flags
end # def data_tar_flags

public(:input, :output, :architecture, :name, :prefix, :converted_from, :to_s, :data_tar_flags)
public(:input, :output, :architecture, :name, :prefix, :version, :converted_from, :to_s, :data_tar_flags)
end # class FPM::Target::Deb

0 comments on commit ada6012

Please sign in to comment.