Skip to content

Commit 14653e9

Browse files
committed
Removes all hardcoded _Apprite_ syntax and replaces with twig tag {{ spec.title }} variations
1 parent 08b3373 commit 14653e9

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

templates/cli/install.ps1.twig

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1+
## <script src="/dist/scripts/cli-bash.js"></script>
2+
## <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/themes/prism-okaidia.min.css" rel="stylesheet" />
3+
## <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/components/prism-core.min.js" data-manual></script>
4+
## <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/components/prism-bash.min.js"></script>
5+
## <style>body {color: #272822; background-color: #272822; font-size: 0.8em;} </style>
16
# Love open-source, dev-tooling and passionate about code as much as we do?
27
# ---
38
# We're always looking for awesome hackers like you to join our 100% remote team!
4-
# Check and see if you find any relevant position @ https://appwrite.io/company/careers
9+
# Check and see if you find any relevant position @ https://{{ spec.title | lower }}.io/company/careers 👩‍💻 😎
510
# (and let us know you found this message...)
611

712
# This script contains hidden JS code to allow better readability and syntax highlighting
813
# You can use "View source" of this page to see the full script.
914

1015
# REPO
11-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/{{ sdk.version }}/appwrite-cli-win-x64.exe"
12-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/{{ sdk.version }}/appwrite-cli-win-arm64.exe"
16+
$GITHUB_x64_URL = "https://github.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName | caseDash }}/releases/download/{{ sdk.version }}/{{ language.params.executableName }}-cli-win-x64.exe"
17+
$GITHUB_arm64_URL = "https://github.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName | caseDash }}/releases/download/{{ sdk.version }}/{{ language.params.executableName }}-cli-win-arm64.exe"
1318

1419
# Appwrite download directory
1520
${{ spec.title | upper }}_DOWNLOAD_DIR = Join-Path -Path $env:TEMP -ChildPath "{{ language.params.executableName }}.exe"
@@ -21,13 +26,8 @@ $USER_PATH_ENV_VAR = [Environment]::GetEnvironmentVariable("PATH", "User")
2126

2227
function Greeting {
2328
Write-Host @"
24-
_ _ _ ___ __ _____
25-
/_\ _ __ _ ____ ___ __(_) |_ ___ / __\ / / \_ \
26-
//_\| '_ \| '_ \ \ /\ / / '__| | __/ _ \ / / / / / /\/
27-
/ _ \ |_) | |_) \ V V /| | | | || __/ / /___/ /___/\/ /_
28-
\_/ \_/ .__/| .__/ \_/\_/ |_| |_|\__\___| \____/\____/\____/
29-
|_| |_|
30-
29+
{{ language.params.logoUnescaped | raw }}
30+
3131
"@ -ForegroundColor red
3232
Write-Host "Welcome to the {{ spec.title | caseUcfirst }} CLI install shield."
3333
}
@@ -54,17 +54,17 @@ function DownloadBinary {
5454
}
5555

5656

57-
Move-Item $APPWRITE_DOWNLOAD_DIR $APPWRITE_INSTALL_DIR
57+
Move-Item ${{ spec.title | upper }}_DOWNLOAD_DIR ${{ spec.title | upper }}_INSTALL_DIR
5858
}
5959

6060

6161
function Install {
6262
Write-Host "[3/4] Starting installation ..."
6363

64-
if ($USER_PATH_ENV_VAR -like '*Appwrite*') {
64+
if ($USER_PATH_ENV_VAR -like '*{{ spec.title | caseUcfirst }}*') {
6565
Write-Host "Skipping to add {{ spec.title | caseUcfirst }} to User Path."
6666
} else {
67-
[System.Environment]::SetEnvironmentVariable("PATH", $USER_PATH_ENV_VAR + ";$APPWRITE_INSTALL_DIR", "User")
67+
[System.Environment]::SetEnvironmentVariable("PATH", $USER_PATH_ENV_VAR + ";${{ spec.title | upper }}_INSTALL_DIR", "User")
6868
}
6969
}
7070

0 commit comments

Comments
 (0)