Skip to content

Commit

Permalink
Touch up
Browse files Browse the repository at this point in the history
  • Loading branch information
kardolus committed Nov 6, 2024
1 parent 76d3d4b commit 570b9da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/release_procedures.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
Execute the Ship-It script to prepare the release:

```shell
make shipit version=v1.0.0 message="bla bla"
make shipit version=v1.2.3 message="in this release we changed xyz"
```

## 2. Create a GitHub release

Use the release notes generated by the `shipit` script when creating a new GitHub release. The `shipit` script also
creates the binaries required for the release in the `./bin` folder.

## 4. Bump the version
## 3. Bump the version

1. Update the URL and sha256 in the Homebrew formula (`kardolus/homebrew-chatgpt-cli/HomebrewFormula/chatgpt-cli.rb`).
2. Calculate the sha256 of the new tar file using:
Expand Down
26 changes: 13 additions & 13 deletions scripts/shipit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ set -euo pipefail
# Navigate to the project root directory
cd "$(dirname "${BASH_SOURCE[0]}")/.."

# Step 1: Check for unstaged changes
# Step 1: Check for tag and commit message arguments
if [[ $# -lt 2 ]]; then
echo "Error: Missing arguments. Usage: ./shipit.sh <tag> <message>"
exit 1
fi

TAG="$1"
MESSAGE="$2"

# Step 2: Check for unstaged changes
echo "Checking for unstaged changes..."
if ! git diff --exit-code > /dev/null; then
echo "Error: You have unstaged changes. Please commit or stash them before running the tests."
exit 1
fi

# Step 2: Update dependencies
# Step 3: Update dependencies
echo "Updating dependencies..."
./scripts/updatedeps.sh

# Step 3: Run all tests (includes linter, 'go fmt', and 'go mod tidy')
# Step 4: Run all tests (includes linter, 'go fmt', and 'go mod tidy')
echo "Running all tests..."
./scripts/all-tests.sh

# Step 4: Check for tag and commit message arguments
if [[ $# -lt 2 ]]; then
echo "Error: Missing arguments. Usage: ./shipit.sh <tag> <message>"
exit 1
fi

TAG="$1"
MESSAGE="$2"

# Step 5: Create and push git tag
echo "Creating git tag..."
git tag -a "$TAG" -m "$MESSAGE"
Expand All @@ -39,6 +39,6 @@ echo "Creating binaries..."

# Step 7: Generate release notes by diffing from the latest tag to HEAD
echo "Generating release notes..."
git diff $(git rev-list --tags --max-count=1)..HEAD -- . ":(exclude)vendor" | chatgpt -n -p ../prompts/write_release_notes.md for the 'how to update' section explain you can use brew upgrade chatgpt-cli or do a direct download of the binaries for your specific OS. The version we are releasing is "$TAG"
git diff "$(git rev-list --tags --max-count=1)"..HEAD -- . ":(exclude)vendor" | chatgpt -n -p ../prompts/write_release_notes.md for the 'how to update' section explain you can use brew upgrade chatgpt-cli or do a direct download of the binaries for your specific OS. The version we are releasing is "$TAG"

echo "Release complete. Tag $TAG has been created, pushed, and binaries are ready."

0 comments on commit 570b9da

Please sign in to comment.