testing release system

This commit is contained in:
Joey Eamigh
2023-06-21 17:15:18 -04:00
parent 89262da6d3
commit 03dca844cb
9 changed files with 182 additions and 25 deletions

17
client/README.md Normal file
View File

@@ -0,0 +1,17 @@
# FishPog Pixelmon Client
This tool makes sure the modpack is up to date, and downloads all of the mods.
## How to use
### Windows
```powershell
.\client.ps1
```
### Linux/Mac
```bash
./client.sh
```

35
client/client.ps1 Normal file → Executable file
View File

@@ -3,8 +3,9 @@ $winget = Get-Command winget -ErrorAction SilentlyContinue
if (!$winget) {
Write-Host "Error: winget is not installed." -Foreground Red
Write-Host "This script may not work withotu winget." -Foreground Red
Write-Host "Run 'Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe' in an admin powershell prompt to install winget." -Foreground Red
Write-Host "This script probably will not work without winget." -Foreground Red
Write-Host "Run 'Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe' in to install winget." -Foreground Red
Write-Host "If you do install winget, this script should handle the rest." -Foreground Red
}
# Check that python is installed
@@ -36,11 +37,33 @@ if (-not (Get-Command "java" -ErrorAction SilentlyContinue)) {
}
# Check that git is installed
if (-not (Get-Command "git" -ErrorAction SilentlyContinue)) {
Write-Host "Error: git is not installed." -Foreground Red
if ($winget) {
Write-Host "Attempting to install git."
winget install --id Git.Git -e --source winget
}
else {
Write-Host "Please install git to continue." -Foreground Red
exit 1
}
}
# Check that multimc is installed
if (-not (Get-Command "multimc" -ErrorAction SilentlyContinue)) {
Write-Host "Error: multimc is not installed." -Foreground Red
Write-Host "Please install multimc to continue." -Foreground Red
exit 1
}
if (Test-Path ".venv") { } else { python -m venv .venv }
.venv\Scripts\Activate
. ./.venv/bin/Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
(python -m pip install --upgrade pip) | Out-Null
(python -m pip install -r requirements.txt) | Out-Null
python .\client.py
python client.py

View File

@@ -1,3 +1,52 @@
#!/usr/bin/env python3
DOWNLOADER_URL = "https://github.com/North-West-Wind/CurseForge-CLI/releases/latest/download/curseforge.zip"
from termcolor import cprint
MOD_DOWNLOADER_URL = "https://github.com/North-West-Wind/CurseForge-CLI/releases/latest/download/curseforge.zip"
REPO_URL = "https://git.233hfd.com/joey/FishPogPixelmon"
# main
def __main__():
header()
warning()
# info
def warning():
cprint(
"This updater may remove your singleplayer worlds. Please use a different instance for singleplayer.", "yellow"
)
if input("Continue? [Y/n] ").lower() == "n":
exit()
else:
print("")
# ascii art lol
def header():
cprint(
"""
_______ __ __ _______
| _ ||__|.-----.| |--.| _ |.-----..-----.
|. 1___|| ||__ --|| ||. 1 || _ || _ |
|. __) |__||_____||__|__||. ____||_____||___ |
|: | |: | |_____|
|::.| |::.|
`---' `---'
_______ __ __
| _ ||__|.--.--..-----.| |.--------..-----..-----.
|. 1 || ||_ _|| -__|| || || _ || |
|. ____||__||__.__||_____||__||__|__|__||_____||__|__|
|: |
|::.|
`---'
""",
"green",
)
# run app
__main__()

20
client/client.sh Normal file → Executable file
View File

@@ -12,11 +12,23 @@ if ! [ -x "$(command -v java)" ]; then
exit 1
fi
if [ -d .venv ]; then; else python -m venv .venv; fi
# check that git is installed
if ! [ -x "$(command -v git)" ]; then
echo 'Error: git is not installed. Please install it to continue.' >&2
exit 1
fi
source .venv/bin/activate
# check that git is installed
if ! [ -x "$(command -v multimc)" ]; then
echo 'Error: multimc is not installed. Please install it to continue.' >&2
exit 1
fi
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
if ! [ -d .venv ]; then python -m venv .venv; fi
source .venv/bin/activate &>/dev/null
python -m pip install --upgrade pip &>/dev/null
python -m pip install -r requirements.txt &>/dev/null
python ./client.py

View File

@@ -1,5 +1,9 @@
certifi==2023.5.7
charset-normalizer==3.1.0
gitdb==4.0.10
GitPython==3.1.31
idna==3.4
requests==2.31.0
smmap==5.0.0
termcolor==2.3.0
urllib3==2.0.3