diff --git a/npm/get-version.js b/npm/get-version.js deleted file mode 100644 index 5198ee913a..0000000000 --- a/npm/get-version.js +++ /dev/null @@ -1,10 +0,0 @@ -const fse = require('fs-extra'); - -const commonProps = fse.readFileSync('../common.props').toString(); - -const versionTag = ''; -const versionEndTag = ''; -const first = commonProps.indexOf(versionTag) + versionTag.length; -const last = commonProps.indexOf(versionEndTag); - -console.log(commonProps.substring(first, last)); diff --git a/npm/preview-publish.ps1 b/npm/preview-publish.ps1 index 524c8afcaa..dc01d2ed1c 100644 --- a/npm/preview-publish.ps1 +++ b/npm/preview-publish.ps1 @@ -8,8 +8,8 @@ param( npm install -$NextVersion = $(node get-version.js) -$rootFolder = (Get-Item -Path "./" -Verbose).FullName +$NextVersion = $(node publish-utils.js --nextVersion) +$RootFolder = (Get-Item -Path "./" -Verbose).FullName if(-Not $Version) { $Version = $NextVersion; @@ -34,7 +34,7 @@ foreach ($command in $commands) { Invoke-Expression $command if($LASTEXITCODE -ne '0' -And $command -notlike '*cd *'){ Write-Host ("Process failed! " + $command) - Set-Location $rootFolder + Set-Location $RootFolder exit $LASTEXITCODE } } \ No newline at end of file