Skip to content

Commit

Permalink
Rename configuration option update-tags to update
Browse files Browse the repository at this point in the history
`update-tags` now acts as a fallback for `update`

Update documentation for changes from c50714c
  • Loading branch information
mymindstorm committed Nov 21, 2021
1 parent c50714c commit 1816e3f
Show file tree
Hide file tree
Showing 5 changed files with 3,940 additions and 24 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: mymindstorm/setup-emsdk@v9
- uses: mymindstorm/setup-emsdk@v11

- name: Verify
run: emcc -v
Expand All @@ -24,7 +24,7 @@ To just cache emsdk:
```yaml
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v9
uses: mymindstorm/setup-emsdk@v11
with:
# Make sure to set a version number!
version: 1.38.40
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}
- uses: mymindstorm/setup-emsdk@v9
- uses: mymindstorm/setup-emsdk@v11
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
Expand All @@ -80,8 +80,8 @@ no-cache:
actions-cache-folder:
description: "Directory to cache emsdk in. This folder will go under $GITHUB_HOME (I.e. build dir) and be cached using @actions/cache."
default: ''
update-tags:
description: "Update tags before installing a version"
update:
description: "Fetch package information for all the new tools and SDK versions"
default: false
```
Expand Down
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ inputs:
description: "If true will not cache any downloads with tc.cacheDir."
default: false
actions-cache-folder:
description: "Directory to cache emsdk in. This folder will go under $GITHUB_HOME (I.e. build dir) and be cached using @actions/cahce."
description: "Directory to cache emsdk in. This folder will go under $GITHUB_HOME (I.e. build dir) and be cached using @actions/cache."
default: ''
update:
description: "Fetch package information for all the new tools and SDK versions"
default: false
update-tags:
description: "Update tags before installing a version"
description: "Deprecated in favor of `update`."
default: false
runs:
using: 'node12'
Expand Down
7 changes: 4 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ function run() {
noInstall: yield core.getInput("no-install"),
noCache: yield core.getInput("no-cache"),
actionsCacheFolder: yield core.getInput("actions-cache-folder"),
updateTags: yield core.getInput("update-tags")
// XXX: update-tags is deprecated and used for backwards compatibility.
update: (yield core.getInput("update")) || (yield core.getInput("update-tags"))
};
let emsdkFolder;
let foundInCache = false;
Expand Down Expand Up @@ -96,8 +97,8 @@ function run() {
return;
}
if (!foundInCache) {
if (emArgs.updateTags) {
yield exec.exec(`${emsdk} update-tags`);
if (emArgs.update) {
yield exec.exec(`${emsdk} update`);
}
yield exec.exec(`${emsdk} install ${emArgs.version}`);
if (emArgs.version !== "latest" && emArgs.version !== "tot" && emArgs.noCache === "false" && !emArgs.actionsCacheFolder) {
Expand Down
Loading

0 comments on commit 1816e3f

Please sign in to comment.