Skip to content

Commit be046f0

Browse files
authored
Merge branch 'master' into kpaulisse-validate-references
2 parents c6c611e + 81a15a6 commit be046f0

2 files changed

Lines changed: 43 additions & 2 deletions

File tree

doc/dev/releasing.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,47 @@
22

33
The project maintainers are responsible for bumping the version number, regenerating auto-generated documentation, tagging the release, and uploading to rubygems.
44

5-
0. Ensure that all changes have been merged to master.
5+
## Local testing
6+
7+
To test the new version of `octocatalog-diff` in the Puppet repository:
8+
9+
0. In the Puppet checkout, start a new branch based off master.
10+
0. In the `octocatalog-diff` checkout:
11+
- Ensure that the desired branch is checked out.
12+
- 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`, ...
13+
- Build the gem using your internal version number:
14+
15+
```
16+
OCTOCATALOG_DIFF_VERSION=0.6.0a rake gem:force-build
17+
```
18+
- Run the task to install the gem into your Puppet checkout:
19+
20+
```
21+
OCTOCATALOG_DIFF_VERSION=0.6.0a rake gem:localinstall
22+
```
23+
24+
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.
25+
26+
## Merging
27+
628
0. If necessary, complete a Pull Request to update the [version file](/.version).
29+
0. If necessary, auto-generate the build documentation.
30+
31+
```
32+
rake doc:build
33+
```
34+
35+
0. Ensure that CI tests are all passing.
36+
0. Merge and delete the branch.
37+
38+
## Releasing
39+
40+
Generally, a new release will correspond to a merge to master of one or more Pull Requests.
41+
42+
0. Ensure that all changes associated with the release have been merged to master.
43+
- Merge all Pull Requests associated with release.
44+
- If necessary, complete a Pull Request to update the [change log](/doc/CHANGELOG.md).
45+
- If necessary (for significant changes), complete a Pull Request to update the top-level README file.
746
0. Ensure the the master branch is checked out on your system.
847
0. Run the release procedure:
948
@@ -13,7 +52,6 @@ The project maintainers are responsible for bumping the version number, regenera
1352
1453
This rake task handles the following:
1554
16-
- Auto-generates the [options reference](/doc/optionsref.md) (`rake doc:build`)
1755
- Build the gem file (`rake gem:build`)
1856
- Tag the release in the repository (`rake gem:tag`)
1957
- Upload the gem file to rubygems (`rake gem:push`)

rake/gem.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ def self.build(target = GEMFILE)
4343

4444
# Push the gem to rubygems
4545
def self.push
46+
raise 'Cannot push version that does not match .version file' unless version == OctocatalogDiff::Version::VERSION
4647
raise "The gem file doesn't exist: #{FINAL_GEMFILE}" unless File.file?(FINAL_GEMFILE)
4748
exec_command("gem push #{Shellwords.escape(FINAL_GEMFILE)}")
4849
end
4950

5051
# Tag the release on GitHub
5152
def self.tag
53+
raise 'Cannot tag version that does not match .version file' unless version == OctocatalogDiff::Version::VERSION
54+
5255
# Make sure we have not released this version before
5356
exec_command('git fetch -t origin')
5457
tags = exec_command('git tag -l').split(/\n/)

0 commit comments

Comments
 (0)