From 9655aa9718978f8ebfe3ff0c596289fdf42bccfa Mon Sep 17 00:00:00 2001 From: Alex Woods Date: Mon, 10 Jan 2022 11:52:04 -0800 Subject: [PATCH] Minor fixes to use 1p release tools. --- .yardopts | 1 - tasks/git.rake | 31 ------------------------------- tasks/test.rake | 1 + 3 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 tasks/git.rake diff --git a/.yardopts b/.yardopts index 0fd6dab..fa9f2ff 100644 --- a/.yardopts +++ b/.yardopts @@ -1,5 +1,4 @@ --title 'jmespath.rb' ---output-dir docs --markup markdown --markup-provider rdiscount --hide-api private diff --git a/tasks/git.rake b/tasks/git.rake deleted file mode 100644 index c107af4..0000000 --- a/tasks/git.rake +++ /dev/null @@ -1,31 +0,0 @@ -task 'git:require-clean-workspace' do - # Ensure the git repo is free of unstaged or untracked files prior - # to building / testing / pushing a release. - unless `git diff --shortstat 2> /dev/null | tail -n1` == '' - warn('workspace must be clean to release') - exit - end -end - -task 'git:tag' do - sh("git commit -m \"Bumped version to v#{$VERSION}\"") - sh("git tag -a -m \"$(rake git:tag_message)\" v#{$VERSION}") -end - -task 'git:tag_message' do - issues = `git log $(git describe --tags --abbrev=0)...HEAD -E --grep '#[0-9]+' 2>/dev/null` - issues = issues.scan(/((?:\S+\/\S+)?#\d+)/).flatten - msg = "Tag release v#{$VERSION}" - msg << "\n\n" - unless issues.empty? - msg << "References: #{issues.uniq.sort.join(', ')}" - msg << "\n\n" - end - msg << `rake changelog:latest` - puts msg -end - -task 'git:push' do - sh('git push origin') - sh('git push origin --tags') -end diff --git a/tasks/test.rake b/tasks/test.rake index e437c8a..82bc371 100644 --- a/tasks/test.rake +++ b/tasks/test.rake @@ -15,3 +15,4 @@ RSpec::Core::RakeTask.new('test:compliance') do |t| end task 'test' => ['test:unit', 'test:compliance'] +task 'release:test' => :test