Created
February 7, 2020 06:06
-
-
Save shashfrankenstien/59fe1871a3a926a6beea90dbd9e3bc3b to your computer and use it in GitHub Desktop.
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 | |
echo %1 | |
set make=%~dpnx0 | |
set EXE=AppName.exe | |
if [%1]==[build] goto :BUILD | |
if [%1]==[install] goto :INSTALL | |
if [%1]==[uninstall] goto :UNINSTALL | |
if [%1]==[clean] goto :CLEAN | |
goto :DONE | |
:BUILD | |
mkdir build | |
cd src | |
go build -o ..\build\%EXE% | |
cd .. | |
goto :DONE | |
:CLEAN | |
rm -rf build | |
goto :DONE | |
:INSTALL | |
%make% build && cp build\%EXE% %GOROOT%\bin && %make% clean | |
goto :DONE | |
:UNINSTALL | |
rm %GOROOT%\bin\%EXE% | |
goto :DONE | |
:DONE | |
echo done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment