Skip to content

Commit

Permalink
complete the release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Dec 7, 2018
1 parent 83db0b7 commit 2b17794
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ jacocoTestReport {
html.enabled = true
}
}

task printVersion {
doLast {
println project.version
}
}
8 changes: 6 additions & 2 deletions release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ if (Test-Path -Path build) {
}
.\gradlew.bat build

$outFolder = 'es-release.prebuilt'
$projectVersion = (gradle printVersion | Select-String -Pattern '\d+\.\d+\.\d+').ToString().Trim()

$outFolder = "es-$projectVersion.prebuilt"
if (Test-Path -Path $outFolder) {
Remove-Item -Path $outFolder -Recurse
}
mkdir $outFolder
Copy-Item -Path .\build\libs\ebook-server-*-RELEASE.war -Destination $outFolder

Push-Location -Path ui
Remove-Item -Path build -Recurse
if (Test-Path -Path 'build') {
Remove-Item -Path build -Recurse
}
npm run build
Pop-Location
Copy-Item -Path .\ui\build -Destination $outFolder\ui -Recurse
Expand Down

0 comments on commit 2b17794

Please sign in to comment.