Skip to content

Commit

Permalink
love windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Sep 14, 2023
1 parent d6095dd commit 4fd1c2f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,21 @@ runs:
echo "found=false" >> $GITHUB_OUTPUT
fi
- name: 'Install jq - Unix-ish'
if: (runner.os == 'Linux' || runner.os == 'macOS') && (steps.jq-check-unix.outputs.found == 'false' || inputs.force == 'true')
- name: 'Install jq - Unix-ish non-1.7'
if: (runner.os == 'Linux' || runner.os == 'macOS') && (inputs.version == '1.5' || inputs.version == '1.6') (steps.jq-check-unix.outputs.found == 'false' || inputs.force == 'true')
shell: bash
env:
JQ_VERSION: '${{ inputs.version }}'
# language=sh
run: |
if [[ '${{ inputs.version }}' == '1.5' ]] || [[ '${{ inputs.version }}' == '1.6' ]]; then
$GITHUB_ACTION_PATH/scripts/unixish.sh
else
$GITHUB_ACTION_PATH/scripts/unixish-17.sh
fi
run: ${{ github.action_path }/scripts/unixish.sh

- name: 'Install jq - Unix-ish 1.7'
if: (runner.os == 'Linux' || runner.os == 'macOS') && inputs.version == '1.7' (steps.jq-check-unix.outputs.found == 'false' || inputs.force == 'true')
shell: bash
env:
JQ_VERSION: '${{ inputs.version }}'
# language=sh
run: ${{ github.action_path }/scripts/unixish-17.sh

- name: 'Check for jq - Windows-ish'
id: jq-check-windows
Expand All @@ -74,12 +77,12 @@ runs:
env:
JQ_VERSION: '${{ inputs.version }}'
# language=powershell
run: .\scripts\windowsish.ps1
run: ${{ github.action_path }\scripts\windowsish.ps1

- name: 'Install jq - Windows-ish 1.7'
if: runner.os == 'Windows' && inputs.version == '1.7' && (steps.jq-check-windows.outputs.found == 'false' || inputs.force == 'true')
shell: powershell
env:
JQ_VERSION: '${{ inputs.version }}'
# language=powershell
run: .\scripts\windowsish-17.ps1
run: ${{ github.action_path }\scripts\windowsish-17.ps1
2 changes: 1 addition & 1 deletion scripts/windowsish-17.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ switch ($_arch_env)
}

# build bin name
$_bin_name = "jq-windows-${_arch}"
$_bin_name = "jq-windows-${_arch}.exe"

# build download vars

Expand Down

0 comments on commit 4fd1c2f

Please sign in to comment.