Clean up release process readme (#7182)
* Clean up release process readme * Update CONTRIBUTING.md Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> --------- Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
This commit is contained in:
@ -122,12 +122,11 @@ https://github.com/KittyCAD/modeling-app/issues/new
|
|||||||
|
|
||||||
#### 2. Push a new tag
|
#### 2. Push a new tag
|
||||||
|
|
||||||
Create a new tag and push it to the repo. The `semantic-release.sh` script will automatically bump the minor part, which we use the most. For instance going from `v0.27.0` to `v0.28.0`.
|
Decide on a `v`-prefixed semver `VERSION` (eg. `v1.2.3`) with the team and tag the repo, eg. on latest main:
|
||||||
|
|
||||||
```
|
```
|
||||||
VERSION=$(./scripts/semantic-release.sh)
|
|
||||||
git tag $VERSION
|
git tag $VERSION
|
||||||
git push origin --tags
|
git push origin $VERSION
|
||||||
```
|
```
|
||||||
|
|
||||||
This will trigger the `build-apps` workflow, set the version, build & sign the apps, and generate release files.
|
This will trigger the `build-apps` workflow, set the version, build & sign the apps, and generate release files.
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Fetch the latest release tag
|
|
||||||
git fetch --all --tags
|
|
||||||
latest_tag=$(git tag --sort=-v:refname | grep "^v[0-9]" | head -n 1)
|
|
||||||
|
|
||||||
# Function to bump version numbers
|
|
||||||
bump_version() {
|
|
||||||
local version=$1
|
|
||||||
local bump_type=$2
|
|
||||||
local major=$(echo $version | cut -d '.' -f 1 | sed 's/v//')
|
|
||||||
local minor=$(echo $version | cut -d '.' -f 2)
|
|
||||||
local patch=$(echo $version | cut -d '.' -f 3)
|
|
||||||
|
|
||||||
case "$bump_type" in
|
|
||||||
major)
|
|
||||||
major=$((major + 1))
|
|
||||||
minor=0
|
|
||||||
patch=0
|
|
||||||
;;
|
|
||||||
minor)
|
|
||||||
minor=$((minor + 1))
|
|
||||||
patch=0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
patch=$((patch + 1))
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "v${major}.${minor}.${patch}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine the type of bump based on the argument
|
|
||||||
bump_type=${1:-minor}
|
|
||||||
|
|
||||||
# Bump the version
|
|
||||||
new_version=$(bump_version $latest_tag $bump_type)
|
|
||||||
|
|
||||||
# Print the new semver tag
|
|
||||||
# Example output v0.27.1
|
|
||||||
# Yes it will include the v at the start
|
|
||||||
echo $new_version
|
|
Reference in New Issue
Block a user