Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
πŸ”¨ Less suck
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaezmien Naejara committed Dec 22, 2020
1 parent a847d65 commit ba1f7ea
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
@echo off
setlocal enabledelayedexpansion

:: Build
echo [Build.bat] Building FiMSharp...
dotnet build FiMSharp -c Release -o bin/

echo.
echo.
echo [Build.bat] Building FiMSharp.Javascript...
dotnet build FiMSharp.Javascript -c Release -o bin/

:: Build test program (optional)
set osType=%1
if not "%osType%"=="" (
if not "%1"=="" (

echo [Build.bat] Building test program...
set binDir=bin/%osType%
dotnet clean -c Release -o "%binDir%"
set FiMos=%1
set FiMbinDir=bin/!FiMos!

echo.
echo.
echo [Build.bat] Building test program to "!FiMbinDir!"...
dotnet clean -c Release -o "!FiMbinDir!"

set buildCommand=dotnet publish FiMSharp.Test --self-contained=true -p:PublishSingleFile=True -c Release -o "%binDir%"
set buildCommand=dotnet publish FiMSharp.Test --self-contained=true -p:PublishSingleFile=True -c Release -o "!FiMbinDir!"

if "%osType%" == "win32" (
%buildCommand% --runtime win-x86
if "!FiMos!" == "win32" (
!buildCommand! --runtime win-x86
)
if "%osType%" == "win" (
%buildCommand% --runtime win-x64
if "!FiMos!" == "win" (
!buildCommand! --runtime win-x64
)
if "%osType%" == "linux" (
%buildCommand% --runtime linux-x64
if "!FiMos!" == "linux" (
!buildCommand! --runtime linux-x64
)
if "%osType%" == "linuxarm" (
%buildCommand% --runtime linux-arm
if "!FiMos!" == "linuxarm" (
!buildCommand! --runtime linux-arm
)
if "%osType%" == "darwin" (
%buildCommand% --runtime osx-x64
if "!FiMos!" == "darwin" (
!buildCommand! --runtime osx-x64
)

)

0 comments on commit ba1f7ea

Please sign in to comment.