Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RELEASING and CONTRIBUTING #828

Merged
merged 9 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
14 changes: 8 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@
git checkout -b fix/some-bug-short-description-#123
```

3. Make your changes, add your files, update documentation ([see Documentation section](#documentation)), commit, and push to your fork.
3. Make your changes, add your files, and [update the documentation](#documentation). Make sure to update the [CHANGELOG](CHANGELOG.md) (*[learn how](https://keepachangelog.com/en/1.1.0/)*).

4. Commit and push to your fork.

```sh
git add src/file.cairo
git commit "Fix some bug short description #123"
git push origin fix/some-bug-short-description-#123
```

4. Run tests and linter. This can be done by running local continuous integration and make sure it passes.
5. Run tests and linter. This can be done by running local continuous integration and make sure it passes.

```bash
# run tests
Expand All @@ -55,14 +57,14 @@
scarb fmt --check
```

5. Go to [OpenZeppelin/cairo-contracts](https://github.com/OpenZeppelin/cairo-contracts) in your web browser and issue a new pull request.
6. Go to [OpenZeppelin/cairo-contracts](https://github.com/OpenZeppelin/cairo-contracts) in your web browser and issue a new pull request.
Begin the body of the PR with "Fixes #123" or "Resolves #123" to link the PR to the issue that it is resolving.
*IMPORTANT* Read the PR template very carefully and make sure to follow all the instructions. These instructions
_IMPORTANT_ Read the PR template very carefully and make sure to follow all the instructions. These instructions

Check failure on line 62 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Lint and test

Emphasis style should be consistent [Expected: asterisk; Actual: underscore]

CONTRIBUTING.md:62:5 MD049/emphasis-style Emphasis style should be consistent [Expected: asterisk; Actual: underscore]
refer to some very important conditions that your PR must meet in order to be accepted, such as making sure that all PR checks pass.

6. Maintainers will review your code and possibly ask for changes before your code is pulled in to the main repository. We'll check that all tests pass, review the coding style, and check for general code correctness. If everything is OK, we'll merge your pull request and your code will be part of OpenZeppelin Contracts for Cairo.
7. Maintainers will review your code and possibly ask for changes before your code is pulled in to the main repository. We'll check that all tests pass, review the coding style, and check for general code correctness. If everything is OK, we'll merge your pull request and your code will be part of OpenZeppelin Contracts for Cairo.
martriay marked this conversation as resolved.
Show resolved Hide resolved

*IMPORTANT* Please pay attention to the maintainer's feedback, since it's a necessary step to keep up with the standards OpenZeppelin Contracts attains to.
_IMPORTANT_ Please pay attention to the maintainer's feedback, since it's a necessary step to keep up with the standards OpenZeppelin Contracts attains to.

Check failure on line 67 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Lint and test

Emphasis style should be consistent [Expected: asterisk; Actual: underscore]

CONTRIBUTING.md:67:5 MD049/emphasis-style Emphasis style should be consistent [Expected: asterisk; Actual: underscore]

## Documentation

Expand Down
29 changes: 11 additions & 18 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
# Releasing

Releasing checklist:
(1) Checkout the branch to be released. This will usually be `main` except in the event of a hotfix. For hotfixes, checkout the release branch you want to fix.

(1) Write a changelog.

(2) Run version bump script with the new version as an argument and open a PR.
(2) Create a new release branch.

```sh
python scripts/update_version.py v0.5.1
```

(3) Create and push a release branch.

```txt
git checkout -b release-v0.5.1
git push release-v0.5.1
git checkout -b release-v0.8.0
```

(4) Checkout the branch to be released. This should be `main` except in the event of a hotfix. For hotfixes, checkout the latest release branch.
(3) Search and replace the current release version with the one to be released (e.g. `0.7.0` to `0.8.0`, or `0.8.0-beta.0` to `0.8.0-beta.1`).

(5) Create a tag for the release.
(4) Push and open a PR targeting `main` and carefully review the changes to spot any bad replacements.

```sh
git tag v0.5.1
git push release-v0.8.0
```

(6) Push the tag to the main repository, [triggering the CI and release process](https://github.com/OpenZeppelin/cairo-contracts/blob/b27101eb826fae73f49751fa384c2a0ff3377af2/.github/workflows/python-app.yml#L60).
(5) Once merged, create a tag for the release and push it to the main repository.

```sh
git push origin v0.5.1
git tag v0.8.0
git push origin v0.8.0
```

(7) Finally, go to the repo's [releases page](https://github.com/OpenZeppelin/cairo-contracts/releases/) and [create a new one](https://github.com/OpenZeppelin/cairo-contracts/releases/new) with the new tag and the base branch as target (which should be `main` except in the event of a hotfix).
(6) Finally, go to the repo's [releases page](https://github.com/OpenZeppelin/cairo-contracts/releases/) and [create a new one](https://github.com/OpenZeppelin/cairo-contracts/releases/new) with the new tag and the base branch as target (`main` except in the event of a hotfix).
Make sure to write a detailed release description and a short changelog.
martriay marked this conversation as resolved.
Show resolved Hide resolved