Skip to content

Commit 5388d42

Browse files
feat: Command Line SDK update for version 19.0.0 (#302)
* chore: update Command Line SDK to 19.0.0 * chore: update Command Line SDK to 19.0.0 * chore: update Command Line SDK to 19.0.0 * chore: update Command Line SDK to 19.0.0 --------- Co-authored-by: root <arnabchatterjee.ac.2@gmail.com>
1 parent 36d1eb5 commit 5388d42

74 files changed

Lines changed: 1141 additions & 1032 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
# them on launch (oven-sh/bun#29120). Unpin once a Bun release includes the
1818
# upstream fix (oven-sh/bun#29122).
1919
CLI_BUN_VERSION: '1.3.11'
20+
HOMEBREW_TAP_REPO: appwrite/homebrew-appwrite
2021
steps:
2122
- uses: actions/checkout@v4
2223
with:
@@ -75,33 +76,34 @@ jobs:
7576
GHR_REPLACE: false
7677
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
7778

78-
- name: Update Homebrew formula checksums
79+
- name: Check out Homebrew tap
80+
uses: actions/checkout@v4
81+
with:
82+
repository: ${{ env.HOMEBREW_TAP_REPO }}
83+
token: ${{ secrets.HOMEBREW_TAP_GH_TOKEN }}
84+
path: homebrew-tap
85+
fetch-depth: 0
86+
87+
- name: Update Homebrew formula in tap
88+
id: tap
89+
working-directory: homebrew-tap
7990
env:
8091
RELEASE_TAG: ${{ github.event.release.tag_name }}
81-
TARGET_COMMITISH: ${{ github.event.release.target_commitish }}
8292
run: |
8393
set -euo pipefail
8494
85-
TARGET_BRANCH="$TARGET_COMMITISH"
86-
if ! git ls-remote --exit-code --heads origin "$TARGET_BRANCH" >/dev/null 2>&1; then
87-
TARGET_BRANCH="master"
88-
fi
89-
90-
git fetch origin "$TARGET_BRANCH"
91-
git switch -C "$TARGET_BRANCH" "origin/$TARGET_BRANCH"
92-
9395
FORMULA_PATH="$(find Formula -maxdepth 1 -name '*.rb' | head -n 1)"
9496
if [ -z "$FORMULA_PATH" ]; then
95-
echo "Formula file not found"
97+
echo "No formula found in Homebrew tap"
9698
exit 1
9799
fi
98-
99100
EXECUTABLE_NAME="$(basename "$FORMULA_PATH" .rb)"
100-
export FORMULA_PATH RELEASE_TAG EXECUTABLE_NAME
101-
export MAC_ARM64_SHA256="$(sha256sum "build/${EXECUTABLE_NAME}-cli-darwin-arm64" | awk '{print $1}')"
102-
export MAC_X64_SHA256="$(sha256sum "build/${EXECUTABLE_NAME}-cli-darwin-x64" | awk '{print $1}')"
103-
export LINUX_ARM64_SHA256="$(sha256sum "build/${EXECUTABLE_NAME}-cli-linux-arm64" | awk '{print $1}')"
104-
export LINUX_X64_SHA256="$(sha256sum "build/${EXECUTABLE_NAME}-cli-linux-x64" | awk '{print $1}')"
101+
102+
export FORMULA_PATH EXECUTABLE_NAME
103+
export MAC_ARM64_SHA256="$(sha256sum "../build/${EXECUTABLE_NAME}-cli-darwin-arm64" | awk '{print $1}')"
104+
export MAC_X64_SHA256="$(sha256sum "../build/${EXECUTABLE_NAME}-cli-darwin-x64" | awk '{print $1}')"
105+
export LINUX_ARM64_SHA256="$(sha256sum "../build/${EXECUTABLE_NAME}-cli-linux-arm64" | awk '{print $1}')"
106+
export LINUX_X64_SHA256="$(sha256sum "../build/${EXECUTABLE_NAME}-cli-linux-x64" | awk '{print $1}')"
105107
106108
ruby <<'RUBY'
107109
formula_path = ENV.fetch("FORMULA_PATH")
@@ -132,13 +134,49 @@ jobs:
132134
133135
ruby -c "$FORMULA_PATH"
134136
137+
{
138+
echo "executable=${EXECUTABLE_NAME}"
139+
echo "formula_path=${FORMULA_PATH}"
140+
} >> "$GITHUB_OUTPUT"
141+
142+
- name: Open pull request on Homebrew tap
143+
working-directory: homebrew-tap
144+
env:
145+
RELEASE_TAG: ${{ github.event.release.tag_name }}
146+
EXECUTABLE_NAME: ${{ steps.tap.outputs.executable }}
147+
FORMULA_PATH: ${{ steps.tap.outputs.formula_path }}
148+
SOURCE_REPO: ${{ github.repository }}
149+
SERVER_URL: ${{ github.server_url }}
150+
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_GH_TOKEN }}
151+
run: |
152+
set -euo pipefail
153+
135154
if git diff --quiet -- "$FORMULA_PATH"; then
136-
echo "Homebrew formula already up to date"
155+
echo "Homebrew formula already up to date for ${RELEASE_TAG}"
137156
exit 0
138157
fi
139158
140-
git config user.name "github-actions[bot]"
141-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
159+
BASE_BRANCH="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')"
160+
BRANCH="release/${EXECUTABLE_NAME}-${RELEASE_TAG}"
161+
162+
git config user.name "appwrite-bot"
163+
git config user.email "bot@appwrite.io"
164+
165+
git checkout -B "$BRANCH"
142166
git add "$FORMULA_PATH"
143-
git commit -m "chore: update Homebrew formula for ${RELEASE_TAG}"
144-
git push origin "$TARGET_BRANCH"
167+
git commit -m "${EXECUTABLE_NAME} ${RELEASE_TAG}"
168+
git push -f -u origin "$BRANCH"
169+
170+
PR_TITLE="${EXECUTABLE_NAME} ${RELEASE_TAG}"
171+
PR_BODY=$(printf 'Automated formula update for the `%s` CLI release [`%s`](%s/%s/releases/tag/%s).\n\nOpened automatically by the `%s` publish workflow after release binaries were uploaded.' "$EXECUTABLE_NAME" "$RELEASE_TAG" "$SERVER_URL" "$SOURCE_REPO" "$RELEASE_TAG" "${SOURCE_REPO#*/}")
172+
173+
EXISTING_PR="$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number' || true)"
174+
if [ -n "$EXISTING_PR" ]; then
175+
gh pr edit "$EXISTING_PR" --title "$PR_TITLE" --body "$PR_BODY"
176+
else
177+
gh pr create \
178+
--title "$PR_TITLE" \
179+
--body "$PR_BODY" \
180+
--base "$BASE_BRANCH" \
181+
--head "$BRANCH"
182+
fi

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Change Log
22

3+
## 19.0.0
4+
5+
* Breaking: Renamed `project update-protocol-status` to `project update-protocol`
6+
* Breaking: Renamed `project update-service-status` to `project update-service`
7+
* Breaking: Removed `projects get-sms-template`, `projects update-sms-template`, and `projects delete-sms-template` commands
8+
* Breaking: Made `--locale` optional on `projects get-email-template`, `projects update-email-template`, and `projects delete-email-template`
9+
* Breaking: Reordered `projects update-email-template` parameters — `--locale` is now optional and placed after `--message`
10+
* Added `--path` prompt during `init site` to choose the local site directory
11+
* Added support for initializing sites into existing non-empty directories without a starter template
12+
* Added structured column renderer for `runtimes` listings
13+
* Added activity-based deployment timeout tracking so healthy long builds in `push function` and `push site` no longer time out prematurely
14+
* Updated `brew install`/`brew upgrade` to use the fully-qualified `appwrite/appwrite/appwrite` formula from the `appwrite/homebrew-appwrite` tap
15+
* Updated `deploymentRetention` prompt to clarify it counts days of non-active deployments
16+
* Updated CLI help and error output to display the correct program name `appwrite`
17+
* Removed `enabled` field from site entries in `appwrite.config.json`
18+
* Fixed command help text to render links inline without markdown brackets
19+
320
## 18.2.0
421

522
* Added source code and entrypoint validation before local function execution

Formula/appwrite.rb

Lines changed: 0 additions & 68 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Command Line SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-cli.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.9.1-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.9.2-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
2929

3030
```sh
3131
$ appwrite -v
32-
18.2.0
32+
19.0.0
3333
```
3434

3535
### Install using prebuilt binaries
@@ -42,12 +42,12 @@ If you do not have `npm` installed, you can always install the prebuilt binaries
4242
$ wget -q https://appwrite.io/cli/install.sh -O - | /bin/bash
4343
```
4444

45-
### MacOS via [Homebrew](https://brew.sh)
45+
### MacOS / Linux via [Homebrew](https://brew.sh)
4646
```bash
47-
$ brew install appwrite
47+
$ brew install appwrite/appwrite/appwrite
4848
```
4949

50-
Homebrew installs the native binary for your platform.
50+
Homebrew pulls the formula from the [`appwrite/homebrew-appwrite`](https://github.com/appwrite/homebrew-appwrite) tap and downloads the native binary for your platform.
5151

5252
### Windows
5353
Via Powershell
@@ -62,7 +62,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
6262
Once the installation completes, you can verify your install using
6363
```
6464
$ appwrite -v
65-
18.2.0
65+
19.0.0
6666
```
6767

6868
## Getting Started

0 commit comments

Comments
 (0)