Skip to content

Commit 61cd024

Browse files
committed
Update local testing
1 parent af58bc1 commit 61cd024

File tree

3 files changed

+7
-46
lines changed

3 files changed

+7
-46
lines changed

doc/dev/releasing.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,13 @@ The project maintainers are responsible for bumping the version number, regenera
66

77
*This procedure is performed by a GitHubber.*
88

9-
To test the new version of `octocatalog-diff` in the GitHub Puppet repository:
9+
To test the new version of `octocatalog-diff` in the GitHub Puppet repository, check out `github/puppet` and:
1010

11-
0. In a checkout of the GitHub Puppet repository, start a new branch based off master.
12-
0. In the `octocatalog-diff` checkout:
13-
- Ensure that the desired branch is checked out.
14-
- Choose a unique internal version number which has never been used in CI. A good guideline is that if you're planning to release a version `0.6.0` then for these tests, use `0.6.0a`, `0.6.0b`, ...
15-
- Build the gem using your internal version number:
16-
17-
```
18-
OCTOCATALOG_DIFF_VERSION=0.6.0a rake gem:force-build
19-
```
20-
- Run the task to install the gem into your Puppet checkout:
21-
22-
```
23-
OCTOCATALOG_DIFF_VERSION=0.6.0a rake gem:localinstall
24-
```
25-
26-
0. Back in the Puppet checkout, ensure that the changes are as expected (updates to Gemfile / Gemfile.lock, addition of new gem). Push the change and build appropriate CI job(s) to validate the changes.
11+
- Start a new branch based off master
12+
- Run `script/update-octocatalog-diff -r <ocd_branch_name>`
13+
- Confirm and commit the result
14+
- Make sure all CI jobs pass
15+
- Run the `puppet-catalog-diff` CI job and make sure it passes and shows expected results
2716

2817
## Merging one PR
2918

octocatalog-diff.gemspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require_relative 'lib/octocatalog-diff/version'
21
require 'json'
32

43
DEFAULT_PUPPET_VERSION = '4.10.8'.freeze
@@ -7,7 +6,7 @@ Gem::Specification.new do |s|
76
s.required_ruby_version = '>= 2.0.0'
87

98
s.name = 'octocatalog-diff'
10-
s.version = ENV['OCTOCATALOG_DIFF_VERSION'] || OctocatalogDiff::Version::VERSION
9+
s.version = ENV['OCTOCATALOG_DIFF_VERSION'] || File.read(File.join(File.dirname(__FILE__), '.version')).strip
1110
s.license = 'MIT'
1211
s.authors = ['GitHub, Inc.', 'Kevin Paulisse']
1312
s.email = '[email protected]'

rake/gem.rb

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -128,31 +128,4 @@ def self.exec_command(command)
128128
task 'yank' do
129129
OctocatalogDiff::Gem.yank
130130
end
131-
132-
# These tasks are specific to a GitHub development environment and will likely not be effective
133-
# in other environments. Specifically this is intended to copy the gem to, and adjust the Gemfile
134-
# of, a checkout of GitHub's puppet repo in a parallel directory.
135-
task 'local' do
136-
Rake::Task['gem:force-build'].invoke
137-
Rake::Task['gem:localinstall'].invoke
138-
end
139-
140-
task 'localinstall' do
141-
script = File.expand_path('../../puppet/script/octocatalog-diff-update.sh', File.dirname(__FILE__))
142-
raise "Cannot execute 'localinstall': script '#{script}' is missing" unless File.file?(script)
143-
144-
# Make sure the gem has been built
145-
branch = OctocatalogDiff::Gem.branch
146-
version = OctocatalogDiff::Gem.version
147-
gemfile = if branch == 'master'
148-
OctocatalogDiff::Gem::FINAL_GEMFILE
149-
else
150-
File.join(OctocatalogDiff::Gem::PKGDIR, "octocatalog-diff-#{version}-#{branch}.gem")
151-
end
152-
raise "Cannot execute 'localinstall': gem '#{gemfile}' has not been built" unless File.file?(gemfile)
153-
154-
# Execute the installation command
155-
command = [script, gemfile, version].map { |x| Shellwords.escape(x) }.join(' ')
156-
system command
157-
end
158131
end

0 commit comments

Comments
 (0)