mirror of
https://github.com/Macrame-App/Macrame
synced 2025-12-29 07:19:26 +00:00
Refactor build-scripts: directory added, old file deleted and windows-build file created.
This commit is contained in:
parent
bb5aedf04a
commit
2fe1266c34
2 changed files with 51 additions and 35 deletions
51
build-scripts/windows-build.bat
Normal file
51
build-scripts/windows-build.bat
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
@echo off
|
||||
|
||||
REM Step 1: Build Macrame Go application for Windows
|
||||
echo Building Macrame Go Application for Windows...
|
||||
|
||||
go build -ldflags "-H=windowsgui" -o Macrame.exe main.go
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Go build failed!
|
||||
exit /b %ERRORLEVEL%
|
||||
) ELSE (
|
||||
echo Go build was succesful!
|
||||
)
|
||||
|
||||
REM Step 2: Build Macrame Vue UI
|
||||
echo Moving to ui directory and building Vue UI
|
||||
cd ui
|
||||
|
||||
echo Running npm install...
|
||||
call npm install
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo npm install failed!
|
||||
exit /b %ERRORLEVEL%
|
||||
)
|
||||
|
||||
echo Running npm run build...
|
||||
call npm run build
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo npm run build failed!
|
||||
exit /b %ERRORLEVEL%
|
||||
)
|
||||
|
||||
REM Step 3: Cleanup root directory of build files.
|
||||
echo Cleaning up root directory...
|
||||
|
||||
echo Removing directories: app, ui and build-scripts
|
||||
rmdir /s /q app
|
||||
rmdir /s /q ui
|
||||
rmdir /s /q build-scripts
|
||||
|
||||
for %%F in (*) do (
|
||||
set "file=%%~nxF"
|
||||
if /I not "!file!"=="Macrame.exe" if /I not "!file!"=="favicon.ico" if /I not "!file!"=="README.md" (
|
||||
echo Deleting !file!
|
||||
del /f /q "%%F"
|
||||
)
|
||||
)
|
||||
|
||||
echo Build and cleanup complete.
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue