diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 9290b16..0000000 --- a/CHANGELOG +++ /dev/null @@ -1,42 +0,0 @@ -2017-12-28 Release 0.3.1 - -- Minor README and CONTRIBUTING documentation updates. - -2017-12-28 Release 0.3.0 - -- Switch to new-style typed parameters. -- Modernize module layout and testing. -- Update supported and tested Puppet versions to 4 and 5. -- Many major puppet module dependency updates. -- Pin puppetlabs-stdlib dependency to 4.12.0, as unfortunately saz/sudo still uses the deprecated ``validate_`` functions. -- Add ``service_state`` parameter to docker class, mainly for acceptance testing -- Add ``service_ensure`` parameter to ``sddm`` class, mainly for acceptance testing -- Use puppet-strings for documentation -- Automate deployment through TravisCI - -2017-07-17 Release 0.2.1 -- Handle upstream chrony service rename to chronyd - -2017-07-09 Release 0.2.0 -- Bump saz/sudo requirement to 4.2.0+ for Arch Linux bug fix -- Remove "xorg-server-utils" package, which has been removed from repos. - -2016-12-05 Release 0.1.5 -- add management of /etc/conf.d to archlinux_workstation::docker class, as it may not already exist - -2016-09-01 Release 0.1.3 -- remove virtualbox-host-modules package in favor of virtualbox-host-dkms -- remove dkms service, as module rebuilding is now handled at install-time via alpm hooks - -2016-03-10 Release 0.1.2 -- add support for PACKAGER variable in makepkg.conf (via ``archlinux_workstation`` class variable) - -2015-11-25 Release 0.1.1 -- add support for a '-m' mail command for cronie - -2015-09-16 Release 0.1.0 -- major ground-up rewrite of module to be more reusable, and targeted at puppet4 - -2014-03-15 Release 0.0.1 -- initial module creation -- migration of a bunch of stuff from https://github.com/jantman/puppet-archlinux-macbookretina diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8aa1c32 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,75 @@ +# Changelog + +All 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/spec/v2.0.0.html). + +[comment]: # IMPORTANT: Remember to update the links at the bottom of the file! + +## [Unreleased] + +## [0.3.2] Released 2017-12-28 + +- Add automated ``github_release`` Rake task. +- Bump puppet-blacksmith gem version and configure for signed tags. +- Reformat changelog + +## [0.3.1] Released 2017-12-28 + +- Minor README and CONTRIBUTING documentation updates. + +## [0.3.0] Released 2017-12-28 + +- Switch to new-style typed parameters. +- Modernize module layout and testing. +- Update supported and tested Puppet versions to 4 and 5. +- Many major puppet module dependency updates. +- Pin puppetlabs-stdlib dependency to 4.12.0, as unfortunately saz/sudo still uses the deprecated ``validate_`` functions. +- Add ``service_state`` parameter to docker class, mainly for acceptance testing +- Add ``service_ensure`` parameter to ``sddm`` class, mainly for acceptance testing +- Use puppet-strings for documentation +- Automate deployment through TravisCI + +## [0.2.1] Released 2017-07-17 + +- Handle upstream chrony service rename to chronyd + +## [0.2.0] Released 2017-07-09 + +- Bump saz/sudo requirement to 4.2.0+ for Arch Linux bug fix +- Remove "xorg-server-utils" package, which has been removed from repos. + +## [0.1.5] Released 2016-12-05 + +- add management of /etc/conf.d to archlinux_workstation::docker class, as it may not already exist + +## 0.1.3 Released 2016-09-01 + +- remove virtualbox-host-modules package in favor of virtualbox-host-dkms +- remove dkms service, as module rebuilding is now handled at install-time via alpm hooks + +## 0.1.2 Released 2016-03-10 + +- add support for PACKAGER variable in makepkg.conf (via ``archlinux_workstation`` class variable) + +## 0.1.1 Released 2015-11-25 + +- add support for a '-m' mail command for cronie + +## 0.1.0 Released 2015-09-16 + +- major ground-up rewrite of module to be more reusable, and targeted at puppet4 + +## 0.0.1 Released 2014-03-15 + +- initial module creation +- migration of a bunch of stuff from https://github.com/jantman/puppet-archlinux-macbookretina + +[Unreleased]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.3.2...master +[0.3.2]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.3.1...0.3.2 +[0.3.1]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.3.0...0.3.1 +[0.3.0]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.2.1...0.3.0 +[0.2.1]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.1.5...0.2.0 +[0.1.5]: https://github.com/jantman/puppet-archlinux-workstation/compare/0.1.3...0.1.5 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fbc6fbd..d1d6fd1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -268,17 +268,17 @@ The record of someone performing the merge is the record that they performed the * [General GitHub documentation](http://help.github.com/) * [GitHub pull request documentation](http://help.github.com/send-pull-requests/) +# Release Process + +1. Ensure all changes were merged to master via PRs. +2. Ensure a [CHANGELOG.md](CHANGELOG.md) entry exists for every change. +3. Use ``bundle exec rake module:bump`` to bump the module version. +4. Update ``CHANGELOG.md`` with the new version, and ensure a link exists for the diff from the last release. +5. Commit those changes (``CHANGELOG.md`` and ``metadata.json``) and push. Wait for the TravisCI build to pass. +6. Use ``bundle exec rake github_release`` to tag the version, push that tag, and create a GitHub Release. +7. TravisCI will build the module and push to the forge, and build docs and push them to github pages. [rspec-puppet]: http://rspec-puppet.com/ [rspec-puppet_docs]: http://rspec-puppet.com/documentation/ [beaker]: https://github.com/puppetlabs/beaker [beaker-rspec]: https://github.com/puppetlabs/beaker-rspec - -# Release Process - -1. Ensure all changes were merged to master via PRs. -2. Ensure a Changelog entry exists for every change. -3. Use ``bundle exec rake module:bump_commit`` to bump the module version and commit. -4. Push that to master. -5. Use ``bundle exec rake module:tag`` to tag the version, and push that tag. -6. TravisCI will build the module and push to the forge, and build docs and push them to github pages. diff --git a/Gemfile b/Gemfile index 45eef34..57ba01a 100644 --- a/Gemfile +++ b/Gemfile @@ -61,7 +61,9 @@ group :system_tests do gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION']) gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION']) gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1') - gem "puppet-blacksmith", '~> 3.4', :require => false + gem "puppet-blacksmith", '>= 4.1.1', :require => false + gem 'vandamme', :require => false + gem 'octokit', "~> 4.0", :require => false end gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION']) diff --git a/Rakefile b/Rakefile index 7643c6f..95d96aa 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,8 @@ require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-lint/tasks/puppet-lint' require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any? require 'puppet-strings' if Bundler.rubygems.find_name('puppet-strings').any? +require 'vandamme' if Bundler.rubygems.find_name('vandamme').any? +require 'octokit' if Bundler.rubygems.find_name('octokit').any? require 'json' PuppetLint.configuration.fail_on_warnings = true @@ -49,7 +51,50 @@ task :release_checks_nonparallel do Rake::Task["check:git_ignore"].invoke end -require 'puppet-strings' +if Bundler.rubygems.find_name('puppet-blacksmith').any? && Bundler.rubygems.find_name('vandamme').any? + bsmith = Blacksmith::RakeTask.new do |t| + t.tag_message_pattern = "Version %s" # Signed tags must have a message + t.tag_sign = true # enable GPG signing + end + + desc 'Tag git (signed), push tag, interactively verify changelog, create GitHub Release' + task :github_release do + fail('ERROR: you must export GITHUB_TOKEN env var') unless ENV.include?('GITHUB_TOKEN') + client = Octokit::Client.new(access_token: ENV['GITHUB_TOKEN']) + # ensure we have valid auth + client.user + # get the module version + mod = Blacksmith::Modulefile.new + modver = mod.version + modtag = "v#{modver}" + # make sure we don't already have a release for it + client.releases('jantman/puppet-archlinux-workstation').each do |r| + abort("ERROR: GitHub Release already exists for tag #{modtag}") if modtag == r.tag_name + end + puts "Module version: #{modver}" + chglog = Vandamme::Parser.new( + changelog: File.read('CHANGELOG.md'), + version_header_exp: /## \[(\d+\.\d+\.\d+)\] Released (\d{4}-\d{2}-\d{2})/, + format: 'markdown' + ).parse + fail("ERROR: no CHANGELOG.md entry for version #{modver}") unless chglog.has_key?(modver) + puts "Changelog for #{modver}:\n\n#{chglog[modver]}\n\n" + print "Does this look correct? [y|N] " + abort('Aborted! Exiting.') unless STDIN.gets.strip == 'y' + puts "Tagging..." + Rake::Task["module:tag"].invoke + puts "Pushing git with tags..." + bsmith.git.push! + puts "Creating GitHub Release..." + rel = client.create_release( + 'jantman/puppet-archlinux-workstation', + modtag, + name: modver, + body: chglog[modver] + ) + puts "Created release: #{rel.html_url}" + end +end if Bundler.rubygems.find_name('puppet-strings').any? # Reimplement puppet-strings "strings:generate" task with custom params diff --git a/metadata.json b/metadata.json index 967ef86..ef1f35d 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "jantman-archlinux_workstation", - "version": "0.3.1", + "version": "0.3.2", "summary": "Configure an Arch Linux workstation/desktop/laptop", "author": "jantman", "description": "Provides many classes (and a sane default class/init.pp) for configuring an Arch Linux workstation/laptop/desktop for graphical use.", @@ -40,7 +40,7 @@ ], "operatingsystem_support": [ { - "operatingsystem": "ArchLinux" + "operatingsystem": "ArchLinux" } ], "requirements": [ @@ -49,7 +49,8 @@ "version_requirement": ">= 4.0.0 < 6.0.0" } ], - "checksums": {}, + "checksums": { + }, "source": "https://github.com/jantman/puppet-archlinux-workstation", "project_page": "https://github.com/jantman/puppet-archlinux-workstation", "license": "GPL-3.0"