Last active
October 26, 2021 09:18
-
-
Save UpcraftLP/b3840e77860171ac07aa4d8c6f565dcf to your computer and use it in GitHub Desktop.
https://github.com/Academy-City/Railgun launch script (also includes vs code launch json)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch Railgun", | |
"type": "coreclr", | |
"request": "launch", | |
"program": "${workspaceFolder}/railgun-launch.bat", | |
"args": ["${relativeFile}"], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cls | |
::set the main file path | |
SET "MAINFILE=%1" | |
SET "COMMAND=dotnet run --project=".\Railgun\Railgun.csproj" -- run "%MAINFILE%"" | |
:: get railgun version | |
CALL :getVersion | |
SET githash=%_result% | |
echo [93mRailgun[0m @[32m%githash%[0m: [90m%COMMAND%[0m | |
echo. | |
CALL %COMMAND% | |
echo. | |
echo [90mProgram exited with code %ERRORLEVEL%[0m | |
echo. | |
goto :EOF | |
:: ---------------------------------------------------------------------------- | |
:getVersion | |
SETLOCAL | |
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse --short HEAD`) DO ( | |
SET githash=%%F | |
) | |
ENDLOCAL & SET "_result=%githash%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment