Kenji Okimoto
null+****@clear*****
Tue Jul 3 12:08:09 JST 2018
Kenji Okimoto 2018-07-03 12:08:09 +0900 (Tue, 03 Jul 2018) New Revision: 7ba176746a9f658bd281e0f11e90ff3b7645ac53 https://github.com/milter-manager/milter-manager/commit/7ba176746a9f658bd281e0f11e90ff3b7645ac53 Message: package ubuntu: Support specifying non-default PPA For example, ``` $ make build DPUT_CONFIGURATION_NAME=milter-manager-test ``` Close #127 Modified files: package/ubuntu/Makefile.am package/ubuntu/upload.rb Modified: package/ubuntu/Makefile.am (+2 -0) =================================================================== --- package/ubuntu/Makefile.am 2018-07-03 11:52:01 +0900 (2d26be85) +++ package/ubuntu/Makefile.am 2018-07-03 12:08:09 +0900 (a107bdf9) @@ -1,4 +1,5 @@ CODE_NAMES = trusty,xenial,zesty,artful,bionic +DPUT_CONFIGURATION_NAME = milter-manager-ppa SOURCE = ../$(PACKAGE)-$(VERSION).tar.gz all: @@ -18,6 +19,7 @@ upload: source ensure-launchpad-configuration --package '$(PACKAGE)' \ --version '$(VERSION)' \ --source-archive '$(SOURCE)' \ + --dput-configuration-name '$(DPUT_CONFIGURATION_NAME)' \ --code-names '$(CODE_NAMES)' \ --debian-directory 'debian' \ --pgp-sign-key '$(LAUNCHPAD_UPLOADER_PGP_KEY)' Modified: package/ubuntu/upload.rb (+9 -2) =================================================================== --- package/ubuntu/upload.rb 2018-07-03 11:52:01 +0900 (634b22e1) +++ package/ubuntu/upload.rb 2018-07-03 12:08:09 +0900 (ccc1fdb8) @@ -20,8 +20,10 @@ require "fileutils" require "pathname" class Uploader + DEFAULT_DPUT_CONFIGURATION_NAME = "milter-manager-ppa" + def initialize - @dput_configuration_name = "milter-manager-ppa" + @dput_configuration_name = DEFAULT_DPUT_CONFIGURATION_NAME end def run @@ -47,10 +49,12 @@ class Uploader return if line.chomp == "[#{@dput_configuration_name}]" end + return unless DEFAULT_DPUT_CONFIGURATION_NAME == @dput_configuration_name + dput_cf_path.open("w") do |dput_cf| dput_cf.puts(dput_cf_content) dput_cf.puts(<<-CONFIGURATION) -[#{@dput_configuration_name}] +[#{DEFAULT_DPUT_CONFIGURATION_NAME}] fqdn = ppa.launchpad.net method = ftp incoming = ~milter-manager/ppa/ubuntu/ @@ -75,6 +79,9 @@ allow_unsigned_uploads = 0 "The source archive") do |source_archive| @source_archive = Pathname.new(source_archive).expand_path end + parser.on("--dput-configuration-name=NAME", "Name of .dput.conf entry") do |name| + @dput_configuration_name = name + end parser.on("--code-names=CODE_NAME1,CODE_NAME2,CODE_NAME3,...", Array, "The target code names") do |code_names| @code_names = code_names -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.osdn.me/mailman/archives/milter-manager-commit/attachments/20180703/5d6c30b0/attachment-0001.htm