Skip to content

Commit

Permalink
Make adjustments for x86 being archived
Browse files Browse the repository at this point in the history
Use --allow-unsupported-windows option, and archive site-url for x86
  • Loading branch information
jon-turney committed Nov 26, 2022
1 parent d3ac917 commit f5e0f04
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ inputs:
site:
description: Download site URL
required: false
default: http://mirrors.kernel.org/sourceware/cygwin/

runs:
using: "composite"
Expand All @@ -37,17 +36,26 @@ runs:
exit 1
}
Invoke-WebRequest https://cygwin.com/setup-$platform.exe -OutFile C:\setup.exe
shell: powershell
- run: |
$packages = '${{ inputs.packages }}'
$pkg_list = $packages.Split('', [System.StringSplitOptions]::RemoveEmptyEntries)
$pkg_list = $pkg_list | % { $_.Trim() }
$pkg_list = $pkg_list | % { $_.Trim(',') }
# default site if not specified
if (! '${{ inputs.site }}' ) {
if ($platform -eq 'x86') {
$site = 'http://mirrors.kernel.org/sourceware/cygwin-archive/20221123'
} else {
$site = 'http://mirrors.kernel.org/sourceware/cygwin/'
}
} else {
$site = '${{ inputs.site }}'
}
$args = @(
'-qgnO',
'-s', '${{ inputs.site }}',
'-s', $site,
'-l', 'C:\cygwin-packages',
'-R', '${{ inputs.install-dir }}'
)
Expand All @@ -61,6 +69,10 @@ runs:
$args += '-X'
}
if ($platform -eq 'x86') {
$args += '--allow-unsupported-windows'
}
# because setup is a Windows GUI app, make it part of a pipeline to make
# PowerShell wait for it to exit
& C:\setup.exe $args | Out-Default
Expand Down

0 comments on commit f5e0f04

Please sign in to comment.