Hello community,
here is the log from the commit of package rubygem-packaging_rake_tasks for
openSUSE:Factory checked in at 2019-08-24 18:42:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-packaging_rake_tasks (Old)
and /work/SRC/openSUSE:Factory/.rubygem-packaging_rake_tasks.new.7948
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-packaging_rake_tasks"
Sat Aug 24 18:42:45 2019 rev:20 rq:724994 version:1.4.9
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-packaging_rake_tasks/rubygem-packaging_rake_tasks.changes
2019-05-14 13:13:07.288758494 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-packaging_rake_tasks.new.7948/rubygem-packaging_rake_tasks.changes
2019-08-24 18:42:46.561778300 +0200
@@ -1,0 +2,12 @@
+Wed Aug 7 14:07:12 UTC 2019 - Martin Vidner <[email protected]>
+
+- Reduce verbosity of tarball making (bsc#1146310)
+- 1.4.9
+
+-------------------------------------------------------------------
+Wed Jun 12 13:15:05 UTC 2019 - Stefan Hundhammer <[email protected]>
+
+- Added git helpers and support for git version tags (bsc#1133435)
+- 1.4.8
+
+-------------------------------------------------------------------
Old:
----
packaging_rake_tasks-1.4.7.gem
New:
----
packaging_rake_tasks-1.4.9.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-packaging_rake_tasks.spec ++++++
--- /var/tmp/diff_new_pack.CDFbMg/_old 2019-08-24 18:42:47.033778255 +0200
+++ /var/tmp/diff_new_pack.CDFbMg/_new 2019-08-24 18:42:47.037778254 +0200
@@ -17,7 +17,7 @@
Name: rubygem-packaging_rake_tasks
-Version: 1.4.7
+Version: 1.4.9
Release: 0
%define mod_name packaging_rake_tasks
%define mod_full_name %{mod_name}-%{version}
++++++ packaging_rake_tasks-1.4.7.gem -> packaging_rake_tasks-1.4.9.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2017-09-21 14:04:46.000000000 +0200
+++ new/VERSION 2017-05-29 13:16:32.000000000 +0200
@@ -1 +1 @@
-1.4.7
+1.4.9
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/packaging/git_helpers.rb
new/lib/packaging/git_helpers.rb
--- old/lib/packaging/git_helpers.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/packaging/git_helpers.rb 2017-05-29 13:16:32.000000000 +0200
@@ -0,0 +1,109 @@
+#--
+# Rake helpers
+#
+# Copyright (C) 2019 SUSE Linux LLC
+# This library is free software; you can redistribute it and/or modify
+# it only under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#++
+
+module Packaging
+ #
+ # Helpers around various git commands
+ module GitHelpers
+ # Create a git tag based on the version and the current branch.
+ #
+ # The optional block can specify the version number to use. If no block
+ # is given, this uses spec_version, i.e. the version number of the first
+ # .spec file in the package/ subdirectory.
+ #
+ # @return [Boolean] true if the tag was created, false if it already
existed
+ #
+ def create_version_tag(&block)
+ name = tag_name(&block)
+ if tag_exists?(name)
+ puts "Tag #{name} already exists"
+ false
+ else
+ puts "Creating tag #{name}"
+ git("tag #{name}")
+ true
+ end
+ end
+
+ # Check if a tag exists.
+ #
+ # @return Boolean
+ #
+ def tag_exists?(name = nil)
+ name ||= tag_name
+ git("tag").include?(name)
+ end
+
+ # Read the package version from the first .spec file in the packages/
+ # subdirectory.
+ #
+ # @return String
+ #
+ def spec_version
+ # use the first *.spec file found, assume all spec files
+ # contain the same version
+ File.readlines(Dir.glob("package/*.spec").first)
+ .grep(/^\s*Version:\s*/).first.sub("Version:", "").strip
+ end
+
+ # Return the name of the current git branch or "detached" if in "head
+ # detached" state.
+ #
+ # @return String
+ #
+ def branch_name
+ branch = git("branch").grep(/^\* /).first.sub(/^\* /, "")
+ return "detached" if branch =~ /HEAD detached/
+ branch
+ end
+
+ # Check if the current branch is "master".
+ #
+ # @return [Boolean]
+ #
+ def master?
+ branch_name == "master"
+ end
+
+ # Return a suitable tag name based on version and branch.
+ # For "master", this is only the version number.
+ # For branches, this is "branchname-version".
+ # If in "detached head" state, this is "detached-version".
+ #
+ # Like in create_version_tag, the optional block can specify the version
+ # number to use. If no block is given, this uses spec_version, i.e. the
+ # version number of the first .spec file in the package/ subdirectory.
+ #
+ # @return String
+ #
+ def tag_name(&block)
+ branch = branch_name
+ version = block_given? ? block.call : spec_version
+ return version if branch == "master"
+ branch + "-" + version
+ end
+
+ # Call a git subcommand and return its output as an array of strings.
+ #
+ # @return Array<String>
+ #
+ def git(subcmd)
+ `/usr/bin/git #{subcmd}`.split("\n")
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/tasks/check_license.rake
new/lib/tasks/check_license.rake
--- old/lib/tasks/check_license.rake 2017-09-21 14:04:46.000000000 +0200
+++ new/lib/tasks/check_license.rake 2017-05-29 13:16:32.000000000 +0200
@@ -113,9 +113,9 @@
if ! report[:missing].empty?
raise "\nMissing license:\n#{report[:missing].join("\n")}"
end
- puts "\nSkipped files:\n#{report[:skipped].join("\n")}" if verbose
- puts "\nCopyright found in these files:\n#{report[:seen].join("\n")}" if
verbose
- puts "\nCopyright detected as not needed in these
files:\n#{report[:unneeded].join("\n")}" if verbose
+ puts "\nSkipped files:\n#{report[:skipped].join("\n")}" if verbose == true
+ puts "\nCopyright found in these files:\n#{report[:seen].join("\n")}" if
verbose == true
+ puts "\nCopyright detected as not needed in these
files:\n#{report[:unneeded].join("\n")}" if verbose == true
puts "\nAll files have proper license reference." if verbose
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/tasks/osc.rake new/lib/tasks/osc.rake
--- old/lib/tasks/osc.rake 2017-09-21 14:04:46.000000000 +0200
+++ new/lib/tasks/osc.rake 2017-05-29 13:16:32.000000000 +0200
@@ -52,7 +52,8 @@
end
def checkout
- sh "osc -A '#{obs_api}' --traceback --verbose checkout '#{obs_project}'
#{package_name}"
+ osc_verbose = (verbose == true) ? "--verbose" : ""
+ sh "osc -A '#{obs_api}' --traceback #{osc_verbose} checkout
'#{obs_project}' #{package_name}"
end
def osc_checkout_dir
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/tasks/tarball.rake new/lib/tasks/tarball.rake
--- old/lib/tasks/tarball.rake 2017-09-21 14:04:46.000000000 +0200
+++ new/lib/tasks/tarball.rake 2017-05-29 13:16:32.000000000 +0200
@@ -36,8 +36,10 @@
# remove the old tarball - all versions
config = Packaging::Configuration.instance
package_glob =
File.join(Dir.pwd,config.package_dir,"#{config.package_name}-*.tar.bz2")
- Dir[package_glob].each do |d|
- rm d
+ verbose(verbose == true) do
+ Dir[package_glob].each do |d|
+ rm d
+ end
end
end
@@ -88,10 +90,17 @@
config = Packaging::Configuration.instance
target = File.join(config.package_dir, package_file_name)
begin
- Rake::Task[target].invoke
- build_tarball
+ puts "* Making tarball #{package_file_path} ..." if verbose
+ # collapse the middle state to false to silence FileUtils
+ verbose(verbose == true) do
+ Rake::Task[target].invoke
+ build_tarball
+ end
+ puts "* ...Done" if verbose
ensure
- rm_rf target
+ verbose(verbose == true) do
+ rm_rf target
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2019-05-10 13:12:44.000000000 +0200
+++ new/metadata 2019-08-20 14:20:38.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: packaging_rake_tasks
version: !ruby/object:Gem::Version
- version: 1.4.7
+ version: 1.4.9
platform: ruby
authors:
- Josef Reidinger
autorequire:
bindir: bin
cert_chain: []
-date: 2019-05-10 00:00:00.000000000 Z
+date: 2019-08-20 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rake
@@ -35,6 +35,7 @@
- VERSION
- lib/packaging.rb
- lib/packaging/configuration.rb
+- lib/packaging/git_helpers.rb
- lib/packaging/tasks.rb
- lib/tasks/build_dependencies.rake
- lib/tasks/check_changelog.rake