Skip to content

Commit

Permalink
Updates from pdk template 1.13.0 (#227)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Geiger <info@mgeiger.de>
  • Loading branch information
mcgege committed Sep 11, 2019
1 parent 51cfa4f commit 5bf249e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 11 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@ end

def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = "puppet-os-hardening" || JSON.load(File.read('metadata.json'))['source'].match(%r{.*/([^/]*)})[1]
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?

returnVal = "puppet-os-hardening"
returnVal ||= begin
metadata_source = JSON.load(File.read('metadata.json'))['source']
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})

metadata_source_match && metadata_source_match[1]
end

raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?

puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
end
Expand Down
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"version_requirement": ">= 5.0.0 < 7.0.0"
}
],
"template-url": "https://github.com/dev-sec/puppet-pdk-template#1.12.0",
"pdk-version": "1.12.0",
"template-ref": "tags/1.12.0-0-gd3c8a7f"
"template-url": "https://github.com/dev-sec/puppet-pdk-template#1.13.0",
"pdk-version": "1.13.0",
"template-ref": "tags/1.13.0-0-g06d1dd0"
}

0 comments on commit 5bf249e

Please sign in to comment.