Skip to content

Instantly share code, notes, and snippets.

@ejangi
Created May 16, 2024 06:02
Show Gist options
  • Save ejangi/70d5cfffa02be201746b2000c2d4a1eb to your computer and use it in GitHub Desktop.
Save ejangi/70d5cfffa02be201746b2000c2d4a1eb to your computer and use it in GitHub Desktop.
:: This batch file does a `cargo build` and if successful, moves the credentials.json file into the build dir.
@ECHO ON
set "DIR=%~dp0"
set "FILE=credentials.json"
echo %DIR%
cargo %1
IF %errorlevel% == 0 (
copy %DIR%src\%FILE% %DIR%target\debug\%FILE%
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment