forked from granicz/SiteFi
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#7 Update scripts for more granular handling of processes, remove npm…
… related script execution from f# projects
- Loading branch information
1 parent
c7d1a60
commit a9b47bb
Showing
17 changed files
with
326 additions
and
59 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
echo "Copy legal files" | ||
|
||
xcopy .\legal\site-docs\intellifactory.com\* .\src\Hosted\legal\ /s /e /y | ||
|
||
echo "Copy blog posts files" | ||
|
||
xcopy .\blogs\user\* .\src\Hosted\posts\ /s /e /y | ||
|
||
echo "Running npm install" | ||
|
||
pushd src/Hosted | ||
npm install | ||
popd | ||
Param( | ||
[Switch] | ||
$deb, | ||
[Parameter(Mandatory=$false)] | ||
[ValidateSet("client", "hosted", "website")] | ||
[String] | ||
$project | ||
) | ||
|
||
echo "Running dotnet build" | ||
|
||
$mode=$args[0] | ||
echo "Param $mode" | ||
if ($mode -ieq "debug") { | ||
echo "Running build in Debug mode..." | ||
dotnet build SiteFi.sln -c Debug | ||
if ($project -ne "") { | ||
if ($deb) { | ||
echo "Running build in Debug mode..." | ||
dotnet build "src\$project\$project.fsproj" --no-incremental -c Debug | ||
} else { | ||
echo "Running build in Release mode..." | ||
dotnet build "src\$project\$project.fsproj" --no-incremental | ||
} | ||
} else { | ||
echo "Running build in Release mode..." | ||
dotnet build SiteFi.sln | ||
if ($deb) { | ||
echo "Running build in Debug mode..." | ||
dotnet build SiteFi.sln --no-incremental -c Debug | ||
} else { | ||
echo "Running build in Release mode..." | ||
dotnet build SiteFi.sln --no-incremental | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,39 @@ | ||
#!/bin/bash | ||
|
||
echo "Copy legal/site-docs/if.com/ under src/Hosted/legal/" | ||
|
||
cp -r legal/site-docs/intellifactory.com/ src/Hosted/legal/ | ||
|
||
echo "Copy blogposts under /src/Hosted/posts" | ||
|
||
cp -r blogs/user src/Hosted/posts | ||
|
||
echo "Installing dotnet-serve" | ||
|
||
dotnet tool install dotnet-serve --tool-path .tools | ||
|
||
echo "Running npm install" | ||
|
||
pushd src/Hosted | ||
npm install | ||
popd | ||
|
||
echo "Running dotnet build" | ||
|
||
if ["{$1^^}" -eq "DEBUG"] | ||
if [[ $(echo "$2" | awk '{print toupper($0)}') = "-PROJECT" ]]; | ||
then | ||
dotnet build SiteFi.sln -c Debug | ||
if [[ $(echo "$3" | awk '{print toupper($0)}') = "CLIENT" ]] || [[ $(echo "$3" | awk '{print toupper($0)}') = "WEBSITE" ]] || [[ $(echo "$3" | awk '{print toupper($0)}') = "HOSTED" ]]; | ||
then | ||
if [[ $(echo "$1" | awk '{print toupper($0)}') = "-DEB" ]]; | ||
then | ||
dotnet build "src/$3/$3.fsproj" --no-incremental -c Debug | ||
else | ||
dotnet build "src/$3/$3.fsproj" --no-incremental | ||
fi | ||
else | ||
>&2 echo "Incorrect project name" | ||
exit 1 | ||
fi | ||
else | ||
dotnet build SiteFi.sln | ||
if [[ $(echo "$1" | awk '{print toupper($0)}') = "-PROJECT" ]]; | ||
then | ||
if [[ $(echo "$2" | awk '{print toupper($0)}') = "CLIENT" ]] || [[ $(echo "$2" | awk '{print toupper($0)}') = "WEBSITE" ]] || [[ $(echo "$2" | awk '{print toupper($0)}') = "HOSTED" ]]; | ||
then | ||
dotnet build "src/$2/$2.fsproj" --no-incremental | ||
else | ||
>&2 echo "Incorrect project name" | ||
exit 1 | ||
fi | ||
else | ||
if [[ $(echo "$1" | awk '{print toupper($0)}') = "-DEB" ]]; | ||
then | ||
dotnet build SiteFi.sln --no-incremental -c Debug | ||
else | ||
dotnet build SiteFi.sln --no-incremental | ||
fi | ||
fi | ||
fi | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cd src/Hosted | ||
npx grunt develop |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cd src/Hosted | ||
npx grunt develop |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Initialize git submodules | ||
git submodule update --init --recursive | ||
|
||
echo "Copy legal/site-docs/if.com/ under src/Hosted/legal/" | ||
cp -r legal/site-docs/intellifactory.com/ src/Hosted/legal/ | ||
|
||
echo "Copy blogposts under /src/Hosted/posts" | ||
cp -r blogs/user src/Hosted/posts | ||
|
||
# Install npm packages | ||
pushd src/Hosted | ||
npm install | ||
npx grunt | ||
popd | ||
|
||
if ["{$1^^}" -eq "--BUILDONLY"] { | ||
if [[ $(echo "$1" | awk '{print toupper($0)}') = "-BUILDONLY" ]]; | ||
then | ||
# Install local dotnet-serve | ||
dotnet tool install dotnet-serve --tool-path .tools | ||
} | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.tools/dotnet-serve.exe -d build -p:56001 --default-extensions:.html -a 0.0.0.0 | ||
dotnet run --project src\Hosted\Hosted.fsproj |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
".tools/dotnet-serve.exe" -d build -p:56001 --default-extensions:.html -a 0.0.0.0 | ||
dotnet run --project src/Hosted/Hosted.fsproj |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.tools/dotnet-serve.exe -d build -p:56001 --default-extensions:.html -a 0.0.0.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
".tools/dotnet-serve.exe" -d build -p:56001 --default-extensions:.html -a 0.0.0.0 |
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
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
Oops, something went wrong.