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

Adding Scoop support #450

Merged
merged 5 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/SDK/Language/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public function getFiles(): array
'destination' => 'package.json',
'template' => 'cli/package.json.twig',
],
[
'scope' => 'default',
'destination' => 'scoop/appwrite.json',
'template' => 'cli/scoop/appwrite.json.twig',
'minify' => false,
],
[
'scope' => 'default',
'destination' => 'LICENSE.md',
Expand Down
5 changes: 5 additions & 0 deletions templates/cli/README.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ $ brew install --HEAD {{ language.params.executableName }}
> Please note that `--HEAD` will be removed with official release.

### Windows
Via Powershell
```powershell
$ iwr -useb {{ sdk.url }}/cli/install.ps1 | iex
```
Via [Scoop](https://scoop.sh)
```powershell
$ scoop install https://raw.githubusercontent.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName | caseDash }}/master/scoop/appwrite.json
```

Once the installation completes, you can verify your install using
```
Expand Down
30 changes: 30 additions & 0 deletions templates/cli/scoop/appwrite.json.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
"version": "{{ sdk.version }}",
"description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
"homepage": "https://github.com/{{ sdk.gitUserName|url_encode }}/{{ sdk.gitRepoName|url_encode }}",
"license": "BSD-3-Clause",
"architecture": {
"64bit": {
"url": "https://github.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName | caseDash }}/releases/download/{{ sdk.version }}/{{ language.params.executableName }}-cli-win-x64.exe",
"bin": [
[
"{{ language.params.executableName }}-cli-win-x64.exe",
"{{ language.params.executableName|caseLower }}"
]
]
},
"arm64": {
"url": "https://github.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName | caseDash }}/releases/download/{{ sdk.version }}/{{ language.params.executableName }}-cli-win-arm64.exe",
"bin": [
[
"{{ language.params.executableName }}-cli-win-arm64.exe",
"{{ language.params.executableName|caseLower }}"
]
]
}
},
"checkver": {
"github": "https://github.com/{{ sdk.gitUserName|url_encode }}/{{ sdk.gitRepoName|url_encode }}"
}
}