set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

# To build and test:
# $ just
#
# To make a release:
# $ just package upload

all:
    dotnet build -c Release
    &"C:\Program Files (x86)\Steam\steam.exe" -applaunch 1966720 --doorstop-enable true --doorstop-target-assembly "C:\Users\user\AppData\Roaming\com.kesomannen.gale\lethal-company\profiles\Muzika Gromche with Imperium\BepInEx\core\BepInEx.Preloader.dll"

package:
    dotnet tool restore
    dotnet build -c Release
    dotnet tcli build --config-path ./ScrapValueDetector/Thunderstore/thunderstore.toml
    # dotnet tcli publish --file ScrapValueDetector/Packages/Ratijas-ScrapValueDetector-{version}.zip
    rm -Recurse -Force dist
    mkdir dist
    mkdir dist/releases
    git archive master --format tar.gz --output dist/releases/Ratijas-ScrapValueDetector-master.tar.gz
    cp ScrapValueDetector/Packages/*.zip dist/releases/
    cp -Recurse assets dist/
    cp ScrapValueDetector/README.md dist/
    cp ScrapValueDetector/Thunderstore/CHANGELOG.md dist/

upload:
    scp -r dist/* "user@ratijas.me:/var/www/html/docs/public/LC/ScrapValueDetector/"
