Skip to content

Commit

Permalink
Merge pull request #79 from vnma0/hestia-zip
Browse files Browse the repository at this point in the history
Switch to compiled build of Hestia in CD
  • Loading branch information
dungwinux authored Apr 21, 2019
2 parents c0573ea + 73952dc commit d6dfca0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
17 changes: 3 additions & 14 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,10 @@ platform:
- x64
install:
- cmd: >-
npm install --global npm@latest
git clone "https://github.com/vnma0/hestia.git" -b master --single-branch "..\hestia"
cd ..\hestia
npm install
npm run build
xcopy .\build ..\wafter\public\ /s /e
cd ..\wafter
npm install
before_build:
- ps: >-
.\hestia.ps1 > $null
build_script:
- cmd: >-
npm run pkg
Expand Down
21 changes: 21 additions & 0 deletions hestia.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$repo = "vnma0/hestia"

$releases_url = "https://api.github.com/repos/$repo/releases/latest"

Write-Host Determining latest release of Hestia...
$get_res = Invoke-WebRequest $releases_url | ConvertFrom-Json
Write-Host Hestia: $get_res.tag_name

Write-Host Downloading latest release...
$asset_name = $get_res.assets[0].name
$asset_url = $get_res.assets[0].browser_download_url
Invoke-WebRequest $asset_url -Out $asset_name

Write-Host Extracting latest release...
if (Test-Path -Path .\public) {
Remove-Item -path .\public -Recurse -Force
}
Expand-Archive $asset_name -DestinationPath .\public
Move-Item -Path .\public\build\* -Destination .\public
Remove-Item .\public\build
Remove-Item $asset_name

0 comments on commit d6dfca0

Please sign in to comment.