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/npm/publish.ps1

32 lines
752 B

param(
[string]$Version
)
if(-Not $Version) {
echo 'Please pass a semantic version like this: ./publish.ps1 -Version patch'
exit
}
$rootFolder = (Get-Item -Path "./" -Verbose).FullName
$commands = (
"cd ng-packs\scripts",
"npm install",
"npm run publish-packages -- $Version",
"cd ../../",
"yarn",
"yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish",
"yarn update:templates",
"yarn gulp:app",
"yarn gulp:module"
)
foreach ($command in $commands) {
Write-Host $command
Invoke-Expression $command
if($LASTEXITCODE -ne '0' -And $command -notlike '*cd *'){
Write-Host ("Process failed! " + $command)
Set-Location $rootFolder
exit $LASTEXITCODE
}
}