Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PA-6427) Add rake tasks for building nightly gem #2726

Merged
merged 1 commit into from
May 29, 2024

Conversation

joshcooper
Copy link
Contributor

The nightly gem's version (aka extended_dot_version) is generated from git describe as the last tag, plus some number of commits and abbreviated git ref:

4.7.0-36-g2ab655b

Additionally, if there are changes in the worktree, then we add 'dirty' to the version.

4.7.0-36-g2ab655b-dirty

The "extended_dot_version" is added to a temporary gemspec that's used to build the gem. That version determines the resulting filename, e.g.

facter-4.7.0-36-g2ab655b.gem

Neither the packaging repo nor this commit update the version in version.rb, so running facter --version may return the "version to be released in the future".

@joshcooper
Copy link
Contributor Author

joshcooper commented May 24, 2024

$ bundle exec rake pl_ci:nightly_gem_build 
Gem::Specification.new do |s|
  s.name = "facter"
  s.version = Gem::Version.new("4.7.0.37.gb956cd2")
  s.installed_by_version = Gem::Version.new("0")
  s.authors = ["Puppet"]
  s.date = Time.utc(2024, 5, 24)
  s.dependencies = [Gem::Dependency.new("ffi",
    Gem::Requirement.new([">= 1.15.5",
      "< 1.17.0",
      "!= 1.16.0",
      "!= 1.16.1",
      "!= 1.16.2"]),
    :development),
   Gem::Dependency.new("rake",
    Gem::Requirement.new(["~> 13.0", ">= 13.0.6"]),
    :development),
   Gem::Dependency.new("rspec",
    Gem::Requirement.new(["~> 3.0"]),
    :development),
   Gem::Dependency.new("rubocop",
    Gem::Requirement.new(["~> 1.28"]),
    :development),
   Gem::Dependency.new("rubocop-performance",
    Gem::Requirement.new(["~> 1.5.2"]),
    :development),
   Gem::Dependency.new("rubocop-rspec",
    Gem::Requirement.new(["~> 2.10"]),
    :development),
   Gem::Dependency.new("simplecov",
    Gem::Requirement.new(["~> 0.17.1"]),
    :development),
   Gem::Dependency.new("sys-filesystem",
    Gem::Requirement.new(["~> 1.4"]),
    :development),
   Gem::Dependency.new("webmock",
    Gem::Requirement.new(["~> 3.12"]),
    :development),
   Gem::Dependency.new("yard", Gem::Requirement.new(["~> 0.9"]), :development),
   Gem::Dependency.new("hocon", Gem::Requirement.new(["~> 1.3"]), :runtime),
   Gem::Dependency.new("thor",
    Gem::Requirement.new([">= 1.0.1", "< 1.3"]),
    :runtime)]
  s.description = "You can prove anything with facts!"
  s.email = ["[email protected]"]
  s.executables = ["facter"]
  s.files = ["LICENSE",
   "bin/facter",
   "lib/docs/generate.rb",
   "lib/docs/generate_cli.rb",
   "lib/docs/template.erb",
   "lib/facter.rb",
   "lib/facter/config.rb",
   "lib/facter/custom_facts/core/aggregate.rb",
   "lib/facter/custom_facts/core/directed_graph.rb",
   "lib/facter/custom_facts/core/execution.rb",
   "lib/facter/custom_facts/core/execution/base.rb",
   "lib/facter/custom_facts/core/execution/popen3.rb",
...
SNIP
...
   "lib/facter/util/utils.rb",
   "lib/facter/util/windows/win32ole.rb",
   "lib/facter/version.rb"]
  s.homepage = "https://github.com/puppetlabs/facter"
  s.licenses = ["Apache-2.0"]
  s.require_paths = ["lib"]
  s.required_ruby_version = Gem::Requirement.new([">= 2.5", "< 4.0"])
  s.required_rubygems_version = Gem::Requirement.new(["> 1.3.1"])
  s.rubygems_version = "3.4.10"
  s.specification_version = 4
  s.summary = "Facter, a system inventory tool"
  end
  Successfully built RubyGem
  Name: facter
  Version: 4.7.0.37.gb956cd2
  File: facter-4.7.0.37.gb956cd2.gem

The nightly gem's version (aka extended_dot_version) is generated from git
describe as the last tag, plus some number of commits and abbreviated git ref:

    4.7.0-36-g2ab655b

Additionally, if there are changes in the worktree, then we add 'dirty'
to the version.

    4.7.0-36-g2ab655b-dirty

The "extended_dot_version" is added to a temporary gemspec that's used
to build the gem. That version determines the resulting filename, e.g.

    facter-4.7.0-36-g2ab655b.gem

Neither the packaging repo nor this commit update the version in `version.rb`,
so running facter --version may return the "version to be released in the
future".
@joshcooper joshcooper marked this pull request as ready for review May 24, 2024 23:04
@joshcooper joshcooper requested a review from a team as a code owner May 24, 2024 23:04
@joshcooper joshcooper changed the title (packaging) Add rake tasks for building nightly gem (PA-6427) Add rake tasks for building nightly gem May 24, 2024
@joshcooper joshcooper added the maintenance Maintenance chores are excluded from changelogs label May 29, 2024
@mhashizume mhashizume merged commit 7a17739 into puppetlabs:main May 29, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance chores are excluded from changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants