From 5cdb7055e51731388870a30b8a1c2a9a4b356a58 Mon Sep 17 00:00:00 2001 From: beerpsi Date: Fri, 1 Dec 2023 02:18:08 +0700 Subject: [PATCH] *actually* allow different forks --- assets/update-artemis.ps1 | 3 ++- build.ps1 | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assets/update-artemis.ps1 b/assets/update-artemis.ps1 index 90cedfa..0bc0013 100644 --- a/assets/update-artemis.ps1 +++ b/assets/update-artemis.ps1 @@ -1,3 +1,4 @@ +$artemis_repo = "%%ARTEMIS_REPO%%" $artemis_branch = "%%ARTEMIS_BRANCH%%" $old = Join-Path $(Get-Location) "artemis" @@ -7,7 +8,7 @@ New-Item -ItemType Directory -Path $tmpdir cd $tmpdir Write-Output "[INFO] Downloading ARTEMiS..." -Invoke-WebRequest "https://gitea.tendokyu.moe/Hay1tsme/artemis/archive/$artemis_branch.zip" -OutFile "artemis-$artemis_branch.zip" +Invoke-WebRequest "https://gitea.tendokyu.moe/$artemis_repo/archive/$artemis_branch.zip" -OutFile "artemis-$artemis_branch.zip" Expand-Archive "artemis-$artemis_branch.zip" Move-Item "artemis-$artemis_branch/artemis" artemis Remove-Item -Recurse "artemis-$artemis_branch" diff --git a/build.ps1 b/build.ps1 index 6115b81..f48af97 100644 --- a/build.ps1 +++ b/build.ps1 @@ -29,8 +29,8 @@ Remove-Item "python-$python_version-embed-amd64.zip" # -------------------------------------------------------- # Setting up MariaDB # -------------------------------------------------------- -$mariadb_root_password = (-join ((65..90) + (97..122) | Get-Random -Count 32 | % {[char]$_})) -$mariadb_aime_password = (-join ((65..90) + (97..122) | Get-Random -Count 32 | % {[char]$_})) +$mariadb_root_password = (-join ((65..90) + (97..122) | Get-Random -Count 32 | ForEach-Object {[char]$_})) +$mariadb_aime_password = (-join ((65..90) + (97..122) | Get-Random -Count 32 | ForEach-Object {[char]$_})) $mariadb_port = (40000..49151) | Get-Random Write-Output "[INFO] Downloading MariaDB $mariadb_version..." @@ -129,7 +129,7 @@ Copy-Item ../assets/update-artemis.bat . New-Item scripts -ItemType Directory Copy-Item ../assets/start.ps1 scripts/ -$update_script = (Get-Content ../assets/update-artemis.ps1) -replace "%%ARTEMIS_BRANCH%%", "$artemis_branch" +$update_script = (Get-Content ../assets/update-artemis.ps1) -replace "%%ARTEMIS_REPO%%", "$artemis_repo" -replace "%%ARTEMIS_BRANCH%%", "$artemis_branch" $update_script | Out-File -Force -FilePath scripts/update-artemis.ps1 $readme = (Get-Content ../assets/README.txt) -replace "%%MARIADB_ROOT_PASSWORD%%", "$mariadb_root_password" -replace "%%MARIADB_AIME_PASSWORD%%", "$mariadb_aime_password" -replace "%%MARIADB_PORT%%", "$mariadb_port" @@ -137,4 +137,4 @@ $readme | Out-File -Force -FilePath README.txt 7z a -t7z ../artemis-portable.7z * -cd .. +Set-Location ..