Browse Source

Add deployment scripts

pull/10885/head
Alper Ebicoglu 4 years ago
parent
commit
11467d8499
  1. 1
      .gitignore
  2. 20
      deploy/1-fetch-and-build.ps1
  3. 6
      deploy/2-nuget-pack.ps1
  4. 27
      deploy/3-nuget-push.ps1
  5. 33
      deploy/4-npm-publish.ps1

1
.gitignore

@ -319,3 +319,4 @@ tempkey.jwk
# appsettings.secrets.json # appsettings.secrets.json
appsettings.secrets.json appsettings.secrets.json
deploy/nuget-api-key.txt deploy/nuget-api-key.txt
deploy/npm-auth-token.txt

20
deploy/1-fetch-and-build.ps1

@ -0,0 +1,20 @@
param(
[string]$branch
)
if (!$branch)
{
$branch = Read-Host "Enter the branch name"
}
echo "`n-----=====[ PULLING ABP REPO - BRANCH: $branch ]=====-----`n"
cd ..
git switch $branch
git pull origin
echo "`n-----=====[ BUILDING ALL PROJECTS ]=====-----`n"
cd build
.\build-all.ps1
echo "`n-----=====[ BUILDING ALL PROJECTS COMPLETED]=====-----`n"

6
deploy/2-nuget-pack.ps1

@ -0,0 +1,6 @@
echo "`n-----=====[ CREATING NUGET PACKAGES ]=====-----`n"
cd ..\nupkg
powershell -File pack.ps1
echo "`n-----=====[ CREATING NUGET PACKAGES COMPLETED ]=====-----`n"

27
deploy/3-nuget-push.ps1

@ -0,0 +1,27 @@
param(
[string]$nugetApiKey
)
if (!$nugetApiKey)
{
#reading password from file content
$passwordFileName = "nuget-api-key.txt"
$pathExists = Test-Path -Path $passwordFileName -PathType Leaf
if ($pathExists)
{
$nugetApiKey = Get-Content $passwordFileName
echo "Using NuGet API Key from $passwordFileName ..."
}
}
if (!$nugetApiKey)
{
$nugetApiKey = Read-Host "Enter the NuGet API KEY"
}
echo "`n-----=====[ PUSHING PACKS TO NUGET ]=====-----`n"
cd ..\nupkg
powershell -File push_packages.ps1 $nugetApiKey
echo "`n-----=====[ PUSHING PACKS TO NUGET COMPLETED ]=====-----`n"

33
deploy/4-npm-publish.ps1

@ -0,0 +1,33 @@
param(
[string]$npmAuthToken
)
if (!$npmAuthToken)
{
#reading password from file content
$passwordFileName = "npm-auth-token.txt"
$pathExists = Test-Path -Path $passwordFileName -PathType Leaf
if ($pathExists)
{
$npmAuthToken = Get-Content $passwordFileName
echo "Using NPM Auth Token from $passwordFileName ..."
}
}
if (!$npmAuthToken)
{
$npmAuthToken = Read-Host "Enter the NPM Auth Token"
}
cd ..\npm
echo "`n-----=====[ SETTING NPM AUTH TOKEN ]=====-----`n"
npm set //registry.npmjs.org/:_authToken $npmAuthToken
echo "`n-----=====[ PUSHING MVC PACKS TO NPM ]=====-----`n"
powershell -File publish-mvc.ps1
echo "`n-----=====[ PUSHING ANGULAR PACKS TO NPM ]=====-----`n"
powershell -File publish-ng.ps1
echo "`n-----=====[ PUSHING PACKS TO NPM COMPLETED ]=====-----`n"
Loading…
Cancel
Save