github.com/quickfeed/quickfeed@v0.0.0-20240507093252-ed8ca812a09c/doc/release-guide.md (about) 1 # Preparing a new Release of QuickFeed's kit Module 2 3 ## Testing the kit module before a release 4 5 Before releasing the kit module, you may wish to test it locally on a course that uses the various APIs; to do this, use go mod's `replace` directive: 6 7 ```shell 8 % go mod edit -replace=github.com/quickfeed/quickfeed/kit=../../quickfeed/kit 9 ``` 10 11 ## Install tools needed for release 12 13 To cut a release you will need additional tools: 14 15 ```shell 16 % go install golang.org/x/exp/cmd/gorelease@latest 17 % brew install gh 18 ``` 19 20 ## Steps necessary to cut a release 21 22 Below are the steps needed to prepare a new release of QuickFeed's kit module. 23 24 1. Run `gorelease` to suggested new version number, e.g.: 25 26 ```text 27 ... (list of compatability changes) ... 28 Inferred base version: v0.2.0 29 Suggested version: v0.3.0 (with tag kit/v0.3.0) 30 ``` 31 32 2. Add and commit changes due to upgrades and recompilation: 33 34 ```shell 35 % git add 36 % git commit -m "QuickFeed's kit module release v0.3.0" 37 # Synchronize master branch 38 % git push 39 ``` 40 41 3. Publish the release with release notes: 42 43 ```shell 44 # Prepare release notes in release-notes.md 45 % gh release create kit/v0.3.0 --prerelease -F release-notes.md --title "Main changes in release" 46 ``` 47 48 Without release notes file (select `Write my own` when asked about release notes): 49 50 ```shell 51 % gh release create kit/v0.3.0 --prerelease --title "Revised MultipleChoice API; rerelease" 52 ``` 53 54 Without the `gh` tool: 55 56 ```shell 57 % git tag kit/v0.3.0 58 % git push origin kit/v0.3.0 59 ``` 60 61 Now other projects can depend on `v0.3.0` of `github.com/quickfeed/quickfeed/kit`. 62 63 4. To check that the new version is available (after a bit of time): 64 65 ```shell 66 % go list -m github.com/quickfeed/quickfeed/kit@v0.3.0 67 ``` 68 69 5. From your course that depend on new features of the kit module: 70 71 ```shell 72 # if you have used a replace directive 73 % go mod edit -dropreplace=github.com/quickfeed/quickfeed/kit 74 % go get -u github.com/quickfeed/quickfeed/kit 75 % go mod tidy 76 % git add go.mod go.sum 77 % git commit -m "Upgraded to latest version of kit module" 78 % git push 79 ```