From bd2ad0100c819891d784945fc9b11faf78b3f004 Mon Sep 17 00:00:00 2001 From: Paul Louth Date: Mon, 2 Sep 2024 22:07:38 +0100 Subject: [PATCH] build & deploy scripts --- clean.sh | 8 +------- docs.sh | 28 +++++++++++++++++++--------- pack.sh | 24 +++++++++++------------- 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/clean.sh b/clean.sh index 14393cc50..4760b1ec0 100644 --- a/clean.sh +++ b/clean.sh @@ -1,17 +1,11 @@ echo cleaing bin, obj, and /louthy.github.io/language-ext -# $BestFormBin is where the bestform.exe is compiled to +# Artifacts is where the DLLs are compiled to Artifacts=/home/paul/Documents/dev/artifacts -# $BestFormBin is where the bestform.exe is compiled to -BestFormBin=/home/paul/Documents/dev/best-form/bestform - # $LangExtRoot is where the source code root should be (i.e. c:\dev\language-ext) LangExtRoot=/home/paul/Documents/dev/language-ext -# $LangExtDocs is where the docs root should be (i.e. c:\dev\louthy.github.io) -LangExtDocs=/home/paul/Documents/dev/louthy.github.io - rm -rf $Artifacts rm -rf $LangExtRoot/LanguageExt.Core/bin diff --git a/docs.sh b/docs.sh index 254185d31..612d5c646 100644 --- a/docs.sh +++ b/docs.sh @@ -1,3 +1,12 @@ +# $BestFormBin is where the bestform.exe is compiled to +BestFormBin=/home/paul/Documents/dev/best-form/bestform + +# $LangExtRoot is where the source code root should be (i.e. c:\dev\language-ext) +LangExtRoot=/home/paul/Documents/dev/language-ext + +# $LangExtDocs is where the docs root should be (i.e. c:\dev\louthy.github.io) +LangExtDocs=/home/paul/Documents/dev/louthy.github.io + echo cleaning the docs rm -rf $LangExtDocs/language-ext/LanguageExt.Core @@ -8,18 +17,19 @@ rm -rf $LangExtDocs/language-ext/LanguageExt.Sys echo building the docs -# $BestFormBin is where the bestform.exe is compiled to -BestFormBin=/home/paul/Documents/dev/best-form/bestform - -# $LangExtRoot is where the source code root should be (i.e. c:\dev\language-ext) -LangExtRoot=/home/paul/Documents/dev/language-ext - -# $LangExtDocs is where the docs root should be (i.e. c:\dev\louthy.github.io) -LangExtDocs=/home/paul/Documents/dev/louthy.github.io - dotnet build $BestFormBin/bestform.csproj -c Release dotnet run --project $BestFormBin -c Release --no-build "LanguageExt.Core" "$LangExtRoot/LanguageExt.Core" "$LangExtDocs/language-ext" "https://github.com/louthy/language-ext/tree/main" dotnet run --project $BestFormBin -c Release --no-build "LanguageExt.Parsec" "$LangExtRoot/LanguageExt.Parsec" "$LangExtDocs/language-ext" "https://github.com/louthy/language-ext/tree/main" dotnet run --project $BestFormBin -c Release --no-build "LanguageExt.FSharp" "$LangExtRoot/LanguageExt.FSharp" "$LangExtDocs/language-ext" "https://github.com/louthy/language-ext/tree/main" dotnet run --project $BestFormBin -c Release --no-build "LanguageExt.Rx" "$LangExtRoot/LanguageExt.Rx" "$LangExtDocs/language-ext" "https://github.com/louthy/language-ext/tree/main" dotnet run --project $BestFormBin -c Release --no-build "LanguageExt.Sys" "$LangExtRoot/LanguageExt.Sys" "$LangExtDocs/language-ext" "https://github.com/louthy/language-ext/tree/main" + +echo committing docs to git + +cd $LangExtDocs + +git add . +git commit -m "Language-ext documentation update" +git push + +echo finished commmitting docs to git diff --git a/pack.sh b/pack.sh index 3b41dba86..a2abc96f9 100644 --- a/pack.sh +++ b/pack.sh @@ -1,21 +1,19 @@ -sh clean.sh -sh docs.sh - -echo committing them to git +# Artifacts is where the DLLs are compiled to +Artifacts=/home/paul/Documents/dev/artifacts -cd $LangExtDocs +# $LangExtRoot is where the source code root should be (i.e. c:\dev\language-ext) +LangExtRoot=/home/paul/Documents/dev/language-ext -git add . -git commit -m "Language-ext documentation update" -git push +sh clean.sh +sh docs.sh cd $LangExtRoot echo building the artefacts dotnet restore -dotnet pack LanguageExt.Core -c Release -o ../artifacts/bin -dotnet pack LanguageExt.FSharp -c Release -o ../artifacts/bin -dotnet pack LanguageExt.Parsec -c Release -o ../artifacts/bin -dotnet pack LanguageExt.Rx -c Release -o ../artifacts/bin -dotnet pack LanguageExt.Sys -c Release -o ../artifacts/bin +dotnet pack LanguageExt.Core -c Release -o $Artifacts +dotnet pack LanguageExt.FSharp -c Release -o $Artifacts +dotnet pack LanguageExt.Parsec -c Release -o $Artifacts +dotnet pack LanguageExt.Rx -c Release -o $Artifacts +dotnet pack LanguageExt.Sys -c Release -o $Artifacts