Add make changelog command and update documentation (#1795)

This commit is contained in:
Zach Wasserman
2021-08-25 15:14:24 -07:00
committed by GitHub
parent a02bede9c7
commit 53e4f1077e
2 changed files with 35 additions and 11 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
.PHONY: build clean clean-assets e2e-reset-db e2e-serve e2e-setup
.PHONY: build clean clean-assets e2e-reset-db e2e-serve e2e-setup changelog
export GO111MODULE=on
@@ -243,3 +243,7 @@ e2e-serve-core:
e2e-serve-basic:
FLEET_SOFTWARE_INVENTORY=1 ./build/fleet serve --dev_license --mysql_address=localhost:3307 --mysql_username=root --mysql_password=toor --mysql_database=e2e --server_address=0.0.0.0:8642
changelog:
sh -c "find changes -type file | grep -v .keep | xargs -I {} sh -c 'grep \"\S\" {}; echo' > new-CHANGELOG.md"
sh -c "cat new-CHANGELOG.md CHANGELOG.md > tmp-CHANGELOG.md && rm new-CHANGELOG.md && mv tmp-CHANGELOG.md CHANGELOG.md"
sh -c "git rm changes/*"
+30 -10
View File
@@ -1,19 +1,29 @@
# Releasing Fleet
Note: Please prefix versions with `v` (eg. `v4.0.0`) in git tags, Helm charts, and NPM configs.
Note: Please prefix versions with `fleet-v` (eg. `fleet-v4.0.0`) in git tags, Helm charts, and NPM configs.
1. Update the [CHANGELOG](../../CHANGELOG.md) with the changes that have been made since the last Fleet release. Update the NPM [package.json](../../tools/fleetctl-npm/package.json) with the new version number (do not yet `npm publish`). Update the [Helm chart](../../charts/fleet/Chart.yaml) and [values file](../../charts/fleet/values.yaml) with the new version number. Remove all files from the `/changes` top-level directory except for the `.keep` file.
1. Update the [CHANGELOG](../../CHANGELOG.md) with the changes that have been made since the last
Fleet release. Use `make changelog` to pull the changes files into `CHANGELOG.md`, then manually
edit. When editing, order the most relevant/important changes at the time, and try to make the
tone and syntax of the written language match throughout. `make changelog` will stage all changes
file entries for deletion with the commit.
Commit these changes via Pull Request and pull the changes on the `main` branch locally. Check that `HEAD` of the `main` branch points to the commit with these changes.
Update the NPM [package.json](../../tools/fleetctl-npm/package.json) with the new version number (do
not yet `npm publish`). Update the [Helm chart](../../charts/fleet/Chart.yaml) and [values
file](../../charts/fleet/values.yaml) with the new version number.
Commit these changes via Pull Request and pull the changes on the `main` branch locally. Check that
`HEAD` of the `main` branch points to the commit with these changes.
2. Tag and push the new release in Git:
```shell
git tag v<VERSION>
git push origin v<VERSION>
git tag fleet-v<VERSION>
git push origin fleet-v<VERSION>
```
Note that `origin` may be `upstream` depending on your `git remote` configuration. The intent here is to push the new tag to the `github.com/fleetdm/fleet` repository.
Note that `origin` may be `upstream` depending on your `git remote` configuration. The intent here
is to push the new tag to the `github.com/fleetdm/fleet` repository.
GitHub Actions will automatically begin building the new release after the tag is pushed.
@@ -25,7 +35,9 @@ Wait while GitHub Actions creates and uploads the artifacts...
When the Actions Workflow has completed:
3. Edit the draft release on the [GitHub releases page](https://github.com/fleetdm/fleet/releases). Use the version number as the release title. Use the below template for the release description (replace items in <> with the appropriate values):
3. Edit the draft release on the [GitHub releases page](https://github.com/fleetdm/fleet/releases).
Use the version number as the release title. Use the below template for the release description
(replace items in <> with the appropriate values):
````
### Changes
@@ -50,10 +62,18 @@ Documentation for this release can be found at https://github.com/fleetdm/fleet/
When editing is complete, publish the release.
4. Publish the new version of `fleetctl` on NPM. Run `npm publish` in the [fleetctl-npm](../../tools/fleetctl-npm/) directory. Note that NPM does not allow replacing a package without creating a new version number. Take care to get things correct before running `npm publish`!
4. Publish the new version of `fleetctl` on NPM. Run `npm publish` in the
[fleetctl-npm](../../tools/fleetctl-npm/) directory. Note that NPM does not allow replacing a
package without creating a new version number. Take care to get things correct before running
`npm publish`!
> If releasing a "prerelease" of Fleet, run `npm publish --tag prerelease`. This way, you can publish a prerelease of fleetctl while the most recent fleetctl npm package, available for public download, is still the latest *official* release.
> If releasing a "prerelease" of Fleet, run `npm publish --tag prerelease`. This way, you can
> publish a prerelease of fleetctl while the most recent fleetctl npm package, available for public
> download, is still the latest *official* release.
5. Announce the release in the #fleet channel of [osquery Slack](https://osquery.slack.com/join/shared_invite/zt-h29zm0gk-s2DBtGUTW4CFel0f0IjTEw#/) and update the channel's topic with the link to this release. Using `@here` requires admin permissions, so typically this announcement will be done by `@zwass`.
5. Announce the release in the #fleet channel of [osquery
Slack](https://osquery.slack.com/join/shared_invite/zt-h29zm0gk-s2DBtGUTW4CFel0f0IjTEw#/) and
update the channel's topic with the link to this release. Using `@here` requires admin
permissions, so typically this announcement will be done by `@zwass`.
Announce the release via blog post (on Medium) and Twitter (linking to blog post).