-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from pd-rs/fix-pwrsh-path
Fix path for powershell
- Loading branch information
Showing
3 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,16 +14,25 @@ Also installs arm-gcc gnu toolchain. | |
- `custom-url` - Custom URL to the SDK installer. Useful for beta versions. If set, `version` will be ignored. | ||
- `gcc` - `true` to install `gcc-arm-none-eabi` toolchain, `false` to don't. Default is `true`. | ||
(Linux & Windows only. On macOS, the sdk installer installs the toolchain itself.) | ||
- `root-win-path` - `true` to convert path to windows path format. _Only for win- workers._ | ||
It changes `outputs.root`, but not `$PLAYDATE_SDK_PATH`. | ||
|
||
|
||
## Supported platforms | ||
|
||
- macOS | ||
- Linux | ||
- Windows | ||
|
||
|
||
## Usage Example | ||
|
||
```yaml | ||
- name: Install Playdate SDK | ||
id: playdate | ||
uses: pd-rs/get-playdate-sdk@0.3 | ||
uses: pd-rs/get-playdate-sdk@0.4 | ||
with: | ||
version: 2.4.2 # possible values: version `x.x.x` or `latest` by default | ||
version: 2.5.0 # possible values: version `x.x.x` or `latest` by default | ||
|
||
- name: usage | ||
run: | | ||
|
@@ -33,8 +42,33 @@ Also installs arm-gcc gnu toolchain. | |
pdc --version # because SDK/bin already in PATH | ||
``` | ||
## Supported platforms | ||
- macOS | ||
- Linux | ||
- Windows | ||
### Windows and Powershell | ||
Note that `$PLAYDATE_SDK_PATH` and `outputs.root` are set in POSIX format. | ||
If you want to use it in powershell you should fix it using one of following solutions: | ||
1. enable `root-win-path` _(see [inputs](#parameters))_ | ||
1. fix the env for powershell from bash with: | ||
```yaml | ||
- if: runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
PLAYDATE_SDK_PATH=$(cygpath -w "$PLAYDATE_SDK_PATH") | ||
echo "PLAYDATE_SDK_PATH=$PLAYDATE_SDK_PATH" >> $GITHUB_ENV | ||
``` | ||
So you'll get fixed `$PLAYDATE_SDK_PATH` for powershell and normal `outputs.root` in POSIX | ||
1. enable `root-win-path` _(see [inputs](#parameters))_ __and__ fix the env for powershell from bash with: | ||
```yaml | ||
- name: Install Playdate SDK | ||
id: playdate | ||
uses: pd-rs/[email protected] | ||
with: | ||
root-win-path: true | ||
- run: echo "PLAYDATE_SDK_PATH=$PLAYDATE_SDK_PATH" >> $GITHUB_ENV | ||
env: PLAYDATE_SDK_PATH: ${{ steps.playdate.outputs.root }} | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
``` | ||
So you'll get both paths fixed for powershell - `$PLAYDATE_SDK_PATH` and `outputs.root`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters