You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/deploy/1-fetch-and-build.ps1

40 lines
1.1 KiB

param(
[string]$branch,
[string]$newVersion
)
if (!$branch)
{
$branch = Read-Host "Enter the branch name"
}
# Read the current version from common.props
$commonPropsFilePath = resolve-path "../common.props"
$commonPropsXmlCurrent = [xml](Get-Content $commonPropsFilePath )
$currentVersion = $commonPropsXmlCurrent.Project.PropertyGroup.Version.Trim()
if (!$newVersion)
{
$newVersion = Read-Host "Current version is '$currentVersion'. Enter the new version "
}
# Update common.props for version attribute
$commonPropsXmlCurrent.Project.PropertyGroup.Version = $newVersion
$commonPropsXmlCurrent.Save( $commonPropsFilePath )
#check if it's updated...
$commonPropsXmlNew = [xml](Get-Content $commonPropsFilePath )
$newVersionAfterUpdate = $commonPropsXmlNew.Project.PropertyGroup.Version
echo "`n`nNew version updated as '$newVersionAfterUpdate' in $commonPropsFilePath`n"
echo "`n-----=====[ PULLING ABP REPO - BRANCH: $branch ]=====-----`n"
cd ..
git switch $branch
git pull origin
echo "`n-----=====[ BUILDING ALL PROJECTS ]=====-----`n"
# .\build\build-all.ps1
echo "`n-----=====[ BUILDING ALL PROJECTS COMPLETED]=====-----`n"