Skip to content

Commit d499278

Browse files
committed
(doc) First pass at porting docs from readme.io
1 parent 935cee6 commit d499278

23 files changed

+545
-18
lines changed

docs/advanced.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Advanced Workflow
2+
3+
In order to best understand the use case for GitReleaseManager let's take a look at an example workflow currently in use by the ChocolateyGUI project.
4+
5+
<div class="admonition note">
6+
<p class="first admonition-title">Note</p>
7+
<p class="last">
8+
ChocolateyGUI uses a number of concepts, for example, GitFlow, psake build script engine, AppVeyor Continuous Integration, as well as using GitReleaseManager. In order to understand the usage of GitReleaseManager for this project, you sort of have to understand the entire process. As a result, this walk-through steps you through the entire end to end process, which as a result, means it is quite lengthy.
9+
</p>
10+
</div>
11+
12+
# ChocolateyGUI
13+
[ChocolateyGUI](https://github.com/chocolatey/ChocolateyGUI) is an open source project, hosted on GitHub that makes use of GitReleaseManager to create and export it's release notes. Before we can get into how GitReleaseManager is used, we need to take a look at how ChocolateyGUI is setup.
14+
15+
## GitHub Setup
16+
* All Issues are tracked using the[ GitHub Issues List](https://github.com/chocolatey/ChocolateyGUI/issues)
17+
* Each Issue is assigned to a [project milestone](https://github.com/chocolatey/ChocolateyGUI/milestones)
18+
* Each Issue is appropriately tagged using one of the [pre-defined labels](https://github.com/chocolatey/ChocolateyGUI/labels)
19+
20+
## GitFlow
21+
* ChocolateyGUI uses the [GitFlow Branching Model](http://nvie.com/posts/a-successful-git-branching-model/)
22+
* [GitVersion](https://github.com/ParticularLabs/GitVersion) is used to determine the current version number, based on the current state of the repository, i.e. what branch is being worked on, and what tags have been assigned, and how many commits have been made to the repository
23+
24+
## Build Artifacts
25+
Every build of ChocolateyGUI generates a number of Build Artifacts, these include:
26+
* An MSI package for installing ChocolateyGUI
27+
* A Chocolatey package to ease the installation of ChocolateyGUI
28+
29+
## Continuous Integration
30+
31+
* ChocolateyGUI uses [AppVeyor](http://www.appveyor.com/) as it's Continuous Integration Server.
32+
* Any time a **Pull Request** is created, an AppVeyor build is triggered, but no deployment of the build artifacts takes place
33+
* Any time a commit is made into the **develop **branch, an AppVeyor build is triggered, and the build artifacts are deployed to the [MyGet Develop Feed](https://www.myget.org/feed/Packages/ghrm_develop)
34+
* Any time a commit is made into the **master **branch, an AppVeyor build is triggered, and the build artifacts are deployed to the [MyGet Master Feed](https://www.myget.org/feed/Packages/ghrm_master)
35+
* Any time a **tag **is applied to the repository, an AppVeyor build is triggered, and the build artifacts are deployed to [Chocolatey.org](https://chocolatey.org/) for public consumption.
36+
37+
## Ok, so where does GitReleaseManager come into play?
38+
39+
The role of GitReleaseManager really comes into play when moving between a **release** or **hotfix** branch and the **master **branch.
40+
41+
Let's say you have done a bunch of work on the develop branch, you want to move all of that work into the master branch, via a release branch. When you do this, you are effectively saying that the milestone that you were working on is almost ready for release. It is at this point that you should really know, via the issues list, everything that is being included in the release, and now would seem like a great time to create some release notes. And this is exactly what the build process for ChocolateyGUI does. Let's break this down further...
42+
43+
* A **release **branch is created from **develop **branch
44+
* The release branch is merged into master branch, triggering a build (with deployment to MyGet Master Feed).
45+
* During this build, GitReleaseManager is executed, using the **create** command, and the version number which was provided by GitVersion, to create a set of release notes for this milestone - [source](https://github.com/chocolatey/ChocolateyGUI/blob/09b78495ebc9d334fedf351b021fd7e215c5cf87/BuildScripts/default.ps1#L687).
46+
* This set of release notes is created in draft format, ready for review, in the GitHub UI.
47+
* The build artifacts which have been deployed to MyGet Master Feed are tested
48+
* The release notes are reviewed, and ensured to be correct
49+
* Assuming that everything is verified to be correct, the draft release is then published through the GitHub UI, which creates a tag in the repository, triggering another AppVeyor build, this time with deployment to Chocolatey.org
50+
* During this build, GitReleaseManager is executed using the **export** command, so that all release notes can be bundled into the application - [source](https://github.com/chocolatey/ChocolateyGUI/blob/09b78495ebc9d334fedf351b021fd7e215c5cf87/BuildScripts/default.ps1#L707)
51+
* In addition, GitReleaseManager is executed using the **addasset** command to add the build artifacts to the GitHub release - [source](https://github.com/chocolatey/ChocolateyGUI/blob/09b78495ebc9d334fedf351b021fd7e215c5cf87/BuildScripts/default.ps1#L731)
52+
* And finally, GitReleaseManager is executed using the **close** command to close the milestone associated with the release that has just been published - [source](https://github.com/chocolatey/ChocolateyGUI/blob/09b78495ebc9d334fedf351b021fd7e215c5cf87/BuildScripts/default.ps1#L753)
53+
54+
The end result of this process can be seen [here](https://github.com/chocolatey/ChocolateyGUI/releases/tag/0.12.0). This release included 218 commits, and 75 issues. Personally, I simply wouldn't have created such a comprehensive set of release notes manually. Instead, I would have written something like...
55+
56+
```
57+
#0.12.0
58+
59+
This release included lots of bug fixes, and tonnes of new features. Enjoy!
60+
```
61+
62+
By leveraging GitVersion, and GitReleaseManager, and a small amount of process (which you are likely already doing), I hope you will agree that you can very easily create a comprehensive set of release notes for your application.

docs/commands/add-assets.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1-
add assets
1+
# Add Assets
2+
3+
Once a draft set of release notes has been created, it is possible to add additional assets to the release using the addasset command.
4+
5+
## **Required Parameters**
6+
* `-u, -username`: The username to access GitHub with.
7+
* `-p, -password`: The password to access GitHub with.
8+
* `-o, -owner`: The owner of the repository.
9+
* `-r, -repository`: The name of the repository.
10+
* `-t, -tagName`: The name of the release (Typically this is the generated SemVer Version Number).
11+
* `-a, -assets`: Path(s) to the file(s) to include in the release. This is a comma separated list of files to include
12+
13+
## **Optional Parameters**
14+
* `-d, -targetDirectory`: The directory on which GitReleaseManager should be executed. Defaults to current directory.
15+
* `-l, -logFilePath`: Path to where log file should be created. Defaults to logging to console.
16+
17+
## **Examples**
18+
19+
```
20+
gitreleasemanager.exe addasset -t 0.1.0 -u bob -p password -o repoOwner -r repo -a c:\buildartifacts\setup.exe,c:\buildartifacts\setup.nupkg
21+
22+
gitreleasemanager.exe create -tagName 0.1.0 -username bob -password password -owner repoOwner -repository repo -assets c:\buildartifacts\setup.exe,c:\buildartifacts\setup.nupkg
23+
```

docs/commands/close.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
close
1+
# Close
2+
3+
Out of the box, publishing a release on GitHub does not close the milestone associated with the release. This command, when executed, closes the specified milestone.
4+
5+
## **Required Parameters**
6+
* `-u, -username`: The username to access GitHub with.
7+
* `-p, -password`: The password to access GitHub with.
8+
* `-o, -owner`: The owner of the repository.
9+
* `-r, -repository`: The name of the repository.
10+
* `-m, -milestone`: The milestone to use.
11+
12+
## **Optional Parameters**
13+
* `-d, -targetDirectory`: The directory on which GitReleaseManager should be executed. Defaults to current directory.
14+
* `-l, -logFilePath`: Path to where log file should be created. Defaults to logging to console.
15+
16+
## **Examples**
17+
18+
```
19+
gitreleasemanager.exe close -m 0.1.0 -u bob -p password -o repoOwner -r repo
20+
21+
gitreleasemanager.exe close -milestone 0.1.0 -username bob -password password -owner repoOwner -repository repo
22+
```

docs/commands/create.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,39 @@
1-
create
1+
# Create
2+
3+
This is the main command of GitReleaseManager and it is used to create a draft set of release notes based on a milestone, which has been set up in GitHub.
4+
5+
There are two modes of operation when creating a Release. GitReleaseManager can take as an input the name of the milestone to generate the release notes from. Or, it can take as an input the name of a file which contains the release notes to include in the Release.
6+
7+
## **Required Parameters**
8+
* `-u, -username`: The username to access GitHub with.
9+
* `-p, -password`: The password to access GitHub with.
10+
* `-o, -owner`: The owner of the repository.
11+
* `-r, -repository`: The name of the repository.
12+
13+
## **Optional Parameters**
14+
* `-m, -milestone`: The milestone to use.
15+
* `-n, -name`: The name of the release (Typically this is the generated SemVer Version Number).
16+
* `-i, -inputFilePath`: The path to the file to be used as the content of the release notes.
17+
* `-e, -pre`: Creates the release as a pre-release.
18+
* `-a, -assets`: Path(s) to the file(s) to include in the release. This is a comma separated list of files to include
19+
* `-c, -targetcommitish`: The commit to tag. Can be a branch or SHA. Defaults to repository's default branch.
20+
* `-d, -targetDirectory`: The directory on which GitReleaseManager should be executed. Defaults to current directory.
21+
* `-l, -logFilePath`: Path to where log file should be created. Defaults to logging to console.
22+
23+
## **Examples**
24+
25+
Use GitReleaseManager to create a Release, generating the release notes based on Milestone:
26+
27+
```
28+
gitreleasemanager.exe create -m 0.1.0 -u bob -p password -o repoOwner -r repo
29+
30+
gitreleasemanager.exe create -milestone 0.1.0 -username bob -password password -owner repoOwner -repository repo
31+
```
32+
33+
Use GitReleaseManager to create a Release, taking the release notes as an input parameter:
34+
35+
```
36+
gitreleasemanager.exe create -i c:\temp\releasenotes.md -n 0.1.0 -u bob -p password -o repoOwner -r repo
37+
38+
gitreleasemanager.exe create -inputFilePath c:\temp\releasenotes.md -name 0.1.0 -username bob -password password -owner repoOwner -repository repo
39+
```

docs/commands/export.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
1-
export
1+
# Export
2+
3+
This command will export all the release notes for a given repository on GitHub. The generated file will be in Markdown format, and the contents of the exported file is configurable using the GitReleaseManager.yaml file, per repository.
4+
5+
There are two modes of operation when exporting Release Notes. GitReleaseManager can either export all Release Notes, or can export only a specific Release, using the tagName parameter.
6+
7+
## **Required Parameters**
8+
* `-u, -username`: The username to access GitHub with.
9+
* `-p, -password`: The password to access GitHub with.
10+
* `-o, -owner`: The owner of the repository.
11+
* `-r, -repository`: The name of the repository.
12+
* `-f, -fileOutputPath`: Path to the file export releases.
13+
14+
## **Optional Parameters**
15+
* `-t, -tagName`: The name of the release (Typically this is the generated SemVer Version Number).
16+
* `-d, -targetDirectory`: The directory on which GitReleaseManager should be executed. Defaults to current directory.
17+
* `-l, -logFilePath`: Path to where log file should be created. Defaults to logging to console.
18+
19+
## **Examples**
20+
21+
Use GitReleaseManager to export all Release Notes:
22+
23+
```
24+
gitreleasemanager.exe export -u bob -p password -o repoOwner -r repo -f c:\temp\releases.md
25+
26+
gitreleasemanager.exe export -username bob -password password -owner repoOwner -repository repo -fileOutputPath c:\temp\releases.md
27+
```

docs/commands/init.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1-
init
1+
# Init
2+
3+
The Init command is used to create GitReleaseManager.yaml which controls the configurable options of GitReleaseManager
4+
5+
## **Optional Parameters**
6+
* `-d, -targetDirectory`: The directory on which GitReleaseManager should be executed. Defaults to current directory.
7+
* `-l, -logFilePath`: Path to where log file should be created. Defaults to logging to console.
8+
9+
## **Examples**
10+
11+
Create a new GitReleaseManager.yaml file in the current working directory:
12+
13+
```
14+
gitreleasemanager.exe init
15+
```
16+
17+
Create a new GitReleaseManager.yaml file in a specific directory:
18+
19+
```
20+
gitreleasemanager.exe init -d c:\temp
21+
22+
gitreleasemanager.exe init -targetDirectory c:\temp
23+
```

docs/commands/publish.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
publish
1+
# Publish
2+
3+
While it would be possible to automatically publish a set of release notes in a single command, it is envisioned that some manual intervention is required to ensure that all release notes are valid, and any additional information is added to the release, prior to publishing. As a result, a second command is required to actually publish a release.
4+
5+
## **Required Parameters**
6+
* `-u, -username`: The username to access GitHub with.
7+
* `-p, -password`: The password to access GitHub with.
8+
* `-o, -owner`: The owner of the repository.
9+
* `-r, -repository`: The name of the repository.
10+
* `-t, -tagName`: The name of the release (Typically this is the generated SemVer Version Number).
11+
12+
## **Optional Parameters**
13+
* `-d, -targetDirectory`: The directory on which GitReleaseManager should be executed. Defaults to current directory.
14+
* `-l, -logFilePath`: Path to where log file should be created. Defaults to logging to console.
15+
16+
## **Examples**
17+
18+
```
19+
gitreleasemanager.exe publish -t 0.1.0 -u bob -p password -o repoOwner -r repo
20+
21+
gitreleasemanager.exe publish -tagName 0.1.0 -username bob -password password -owner repoOwner -repository repo
22+
```

docs/commands/show-config.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1-
show config
1+
# Show Config
2+
3+
The showconfig command is used to display the current configuration for GitReleaseManager when executed against a specific directory.
4+
5+
## **Optional Parameters**
6+
* `-d, -targetDirectory`: The directory on which GitReleaseManager should be executed. Defaults to current directory.
7+
* `-l, -logFilePath`: Path to where log file should be created. Defaults to logging to console.
8+
9+
## **Examples**
10+
11+
Show the configuration for the current working directory:
12+
13+
```
14+
gitreleasemanager.exe showconfig
15+
```
16+
17+
Show the configuration for a specific directory:
18+
19+
```
20+
gitreleasemanager.exe showconfig -d c:\temp
21+
22+
gitreleasemanager.exe showconfig -targetDirectory c:\temp
23+
```
Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
create
1+
# Example of Create Configuration
2+
3+
When creating a release, it is possible to control the look and feel of the release notes, using settings within the GitReleaseManager.yaml file.
4+
5+
Out of the box, GitReleaseManager creates a simple list of Issues included within a milestone, split into the labels that have been configured. However, it is possible to include additional information in the form of a footer, which provides additional information, for example, where an installation of the release can be located.
6+
7+
Take for example the GitReleaseManager.yaml file which is used by the [ChocolateyGUI](https://github.com/chocolatey/ChocolateyGUI) project:
8+
9+
```
10+
create:
11+
include-footer: true
12+
footer-heading: Where to get it
13+
footer-content: You can download this release from [chocolatey.org](https://chocolatey.org/packages/chocolateyGUI/{milestone})
14+
footer-includes-milestone: true
15+
milestone-replace-text: '{milestone}'
16+
```
17+
18+
This would result in the following [release notes](https://github.com/chocolatey/ChocolateyGUI/releases/tag/0.13.1) being generated:
19+
20+
![Example Release Notes]()
21+
22+
<div class="admonition note">
23+
<p class="first admonition-title">Note</p>
24+
<p class="last">
25+
The generated URL for the link to Chocolatey.org includes the milestone number. The complete URL is https://chocolatey.org/packages/chocolateyGUI/0.13.1. This was achieved by using a regular expression replacement of the [footer-content](doc:default-configuration), using the [milestone-replace-text](doc:default-configuration) property as the text to replace with the actual milestone.
26+
27+
This approach can be used for any project, this example simply shows what is done in the ChocolateyGUI project.
28+
</p>
29+
</div>

0 commit comments

Comments
 (0)