Skip to content

Commit 9a5b790

Browse files
authored
Merge pull request #324 from puppetlabs/pdksync_maint-pdk-update
pdksync - (MAINT) PDK Update
2 parents 8a9d8e6 + 420b1fa commit 9a5b790

File tree

5 files changed

+5
-89
lines changed

5 files changed

+5
-89
lines changed

.sync.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
delete: true
88
appveyor.yml:
99
delete: true
10-
Gemfile:
11-
optional:
12-
':development':
13-
- gem: 'github_changelog_generator'
14-
version: '~> 1.15.0'
1510
Rakefile:
1611
changelog_version_tag_pattern: 'v%s'
1712
changelog_since_tag: '1.2.0'

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ group :development do
2323
gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false
2424
gem "facterdb", '~> 1.18', require: false
2525
gem "metadata-json-lint", '~> 3.0', require: false
26+
gem "puppetlabs_spec_helper", '~> 6.0', require: false
2627
gem "rspec-puppet-facts", '~> 2.0', require: false
2728
gem "codecov", '~> 0.2', require: false
2829
gem "dependency_checker", '~> 1.0.0', require: false
@@ -33,16 +34,16 @@ group :development do
3334
gem "rubocop", '= 1.48.1', require: false
3435
gem "rubocop-performance", '= 1.16.0', require: false
3536
gem "rubocop-rspec", '= 2.19.0', require: false
37+
gem "puppet-strings", '~> 4.0', require: false
3638
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
37-
gem "github_changelog_generator", '~> 1.15.0', require: false
3839
end
3940
group :system_tests do
4041
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
4142
gem "serverspec", '~> 2.41', require: false
4243
end
4344
group :release_prep do
4445
gem "puppet-strings", '~> 4.0', require: false
45-
gem "puppetlabs_spec_helper", '~> 7.0', require: false
46+
gem "puppetlabs_spec_helper", '~> 6.0', require: false
4647
end
4748

4849
puppet_version = ENV['PUPPET_GEM_VERSION']

Rakefile

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -4,87 +4,7 @@ require 'bundler'
44
require 'puppet_litmus/rake_tasks' if Gem.loaded_specs.key? 'puppet_litmus'
55
require 'puppetlabs_spec_helper/rake_tasks'
66
require 'puppet-syntax/tasks/puppet-syntax'
7-
require 'github_changelog_generator/task' if Gem.loaded_specs.key? 'github_changelog_generator'
87
require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings'
98
require 'puppet-strings/tasks'
109

11-
def changelog_user
12-
return unless Rake.application.top_level_tasks.include? "changelog"
13-
returnVal = nil || JSON.load(File.read('metadata.json'))['author']
14-
raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
15-
puts "GitHubChangelogGenerator user:#{returnVal}"
16-
returnVal
17-
end
18-
19-
def changelog_project
20-
return unless Rake.application.top_level_tasks.include? "changelog"
21-
22-
returnVal = nil
23-
returnVal ||= begin
24-
metadata_source = JSON.load(File.read('metadata.json'))['source']
25-
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
26-
27-
metadata_source_match && metadata_source_match[1]
28-
end
29-
30-
raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
31-
32-
puts "GitHubChangelogGenerator project:#{returnVal}"
33-
returnVal
34-
end
35-
36-
def changelog_future_release
37-
return unless Rake.application.top_level_tasks.include? "changelog"
38-
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
39-
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
40-
puts "GitHubChangelogGenerator future_release:#{returnVal}"
41-
returnVal
42-
end
43-
4410
PuppetLint.configuration.send('disable_relative')
45-
46-
47-
if Gem.loaded_specs.key? 'github_changelog_generator'
48-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
49-
raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
50-
config.user = "#{changelog_user}"
51-
config.project = "#{changelog_project}"
52-
config.since_tag = "1.2.0"
53-
config.future_release = "#{changelog_future_release}"
54-
config.exclude_labels = ['maintenance']
55-
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
56-
config.add_pr_wo_labels = true
57-
config.issues = false
58-
config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB"
59-
config.configure_sections = {
60-
"Changed" => {
61-
"prefix" => "### Changed",
62-
"labels" => ["backwards-incompatible"],
63-
},
64-
"Added" => {
65-
"prefix" => "### Added",
66-
"labels" => ["enhancement", "feature"],
67-
},
68-
"Fixed" => {
69-
"prefix" => "### Fixed",
70-
"labels" => ["bug", "documentation", "bugfix"],
71-
},
72-
}
73-
end
74-
else
75-
desc 'Generate a Changelog from GitHub'
76-
task :changelog do
77-
raise <<EOM
78-
The changelog tasks depends on recent features of the github_changelog_generator gem.
79-
Please manually add it to your .sync.yml for now, and run `pdk update`:
80-
---
81-
Gemfile:
82-
optional:
83-
':development':
84-
- gem: 'github_changelog_generator'
85-
version: '~> 1.15'
86-
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')"
87-
EOM
88-
end
89-
end
90-

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@
6666
],
6767
"pdk-version": "3.0.0",
6868
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
69-
"template-ref": "heads/main-0-g01c6a19"
69+
"template-ref": "heads/main-0-g79a2f93"
7070
}

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
default_facts = {
1515
puppetversion: Puppet.version,
16-
facterversion: Facter.version
16+
facterversion: Facter.version,
1717
}
1818

1919
default_fact_files = [

0 commit comments

Comments
 (0)