Skip to content

Commit

Permalink
add download and list
Browse files Browse the repository at this point in the history
  • Loading branch information
irkode committed Aug 20, 2024
1 parent 48b4fa0 commit bfd42eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
Remove-Item -Recurse .\assets -ErrorAction SilentlyContinue
Remove-Item -Recurse .\.github -ErrorAction SilentlyContinue
Remove-Item .\.gitignore -ErrorAction SilentlyContinue
if (Test-Path .\assets) { throw ".\assets should not exist"}
if (Test-Path .\.github) { throw ".\assets should not exist"}
if (Test-Path .\.gitignore) { throw ".\assets should not exist"}
[void](Test-Path .\assets -ErrorAction Stop)
[void](Test-Path .\.github -ErrorAction Stop)
[void](Test-Path .\.gitignore -ErrorAction Stop)
- name: Download Bulma
run: |
Expand All @@ -63,15 +63,16 @@ jobs:
$BulmaRelease = $BulmaReleases | Where-Object { -Not $_.known } | Select-Object -First 1
if ($BulmaRelease) {
Write-Output "Downloading Bulma $($BulmaRelease.release)"
#Invoke-WebRequest -Uri $BulmaRelease.download -OutFile $BulmaRelease.archive
#$bulmaFolder = (Get-Item $BulmaRelease.archive).Basename
Invoke-WebRequest -Uri $BulmaRelease.download -OutFile $BulmaRelease.archive
[void](Test-Path $BulmaRelease.archive -ErrorAction Stop)
$bulmaFolder = (Get-Item $BulmaRelease.archive).Basename
#[void](New-Item -Type Directory ./assets -ErrorAction Stop)
#if (-Not (Test-Path .\assets -PathType Container)) { throw "missing folder: assets"}
#Expand-Archive -LiteralPath $BulmaRelease.archive -DestinationPath .\assets
#if (Test-Path .\assets\__MACOSX) { Remove-Item .\assets\__MACOSX -ErrorAction SilentlyContinue -Recurse }
#Rename-Item .\assets\$bulmaFolder "bulma"
#if (-Not (Test-Path ./assets/bulma -PathType Container)) { throw "missing folder: assets/bulma folder"}
[void](New-Item -Type Directory ./assets -ErrorAction Stop)
[void](Test-Path .\assets -PathType Container -ErrorAction Stop)
Expand-Archive -LiteralPath $BulmaRelease.archive -DestinationPath .\assets
if (Test-Path .\assets\__MACOSX) { Remove-Item .\assets\__MACOSX -ErrorAction SilentlyContinue -Recurse }
Rename-Item .\assets\$bulmaFolder "bulma"
[void](Test-Path ./assets/bulma -PathType Container -ErrorAction Stop)
echo "BULMA_RELEASE=$($BulmaRelease.release)" | Out-File $Env:GITHUB_ENV -Append -Encoding utf8
echo "BULMA_ARCHIVE=$($BulmaRelease.archive)" | Out-File $Env:GITHUB_ENV -Append -Encoding utf8
Write-Output "download successful: $($BulmaRelease.archive)"
Expand All @@ -84,6 +85,8 @@ jobs:
Write-Host "Creating Release for $ENV:BULMA_RELEASE : $ENV:BULMA_ARCHIVE"
$BulmaRelease = "$ENV:BULMA_RELEASE"
$BulmaArchive = "$ENV:BULMA_ARCHIVE"
$cwd = ($pwd.Path -replace "\\","\\") + "\\"
(Get-ChildItem . -recurse).FullName -replace $cwd, ""|sort
#git checkout -b "bulma-$BulmaRelease"
#Remove-Item $BulmaArchive -ErrorAction SilentlyContinue
#if (Test-Path $BulmaArchive { throw "failed to remove downloaded archive: $BulmaArchive" }
Expand Down
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

0 comments on commit bfd42eb

Please sign in to comment.