Move bin path, in Windows, from D: to C: (#251)

This commit is contained in:
Paulo F. Oliveira
2024-02-13 04:03:29 +00:00
committed by GitHub
parent f2c1b65313
commit 951dd857ae
8 changed files with 995 additions and 793 deletions
+4 -4
View File
@@ -199,7 +199,7 @@ jobs:
- run: env - run: env
- name: Check environment variables - name: Check environment variables
run: | run: |
${INSTALL_DIR_FOR_ELIXIR}/elixir --version ${INSTALL_DIR_FOR_ELIXIR}/bin/elixir -v
${INSTALL_DIR_FOR_GLEAM}/gleam --version ${INSTALL_DIR_FOR_GLEAM}/bin/gleam --version
${INSTALL_DIR_FOR_OTP}/erl -version ${INSTALL_DIR_FOR_OTP}/bin/erl -version
${INSTALL_DIR_FOR_REBAR3}/rebar3 version ${INSTALL_DIR_FOR_REBAR3}/bin/rebar3 version
+5 -5
View File
@@ -137,8 +137,8 @@ jobs:
- run: env - run: env
- name: Check environment variables - name: Check environment variables
run: | run: |
${INSTALL_DIR_FOR_ELIXIR}/elixir --version & "$Env:INSTALL_DIR_FOR_ELIXIR/bin/elixir" "-v"
${INSTALL_DIR_FOR_GLEAM}/gleam --version & "$Env:INSTALL_DIR_FOR_GLEAM/bin/gleam.exe" "--version"
${INSTALL_DIR_FOR_OTP}/erl -version & "$Env:INSTALL_DIR_FOR_OTP/bin/erl.exe" "+V"
${INSTALL_DIR_FOR_REBAR3}/rebar3 version & "$Env:INSTALL_DIR_FOR_REBAR3/bin/rebar3.cmd" "version"
shell: bash & "$Env:INSTALL_DIR_FOR_REBAR3/bin/rebar3.ps1" "version"
-1
View File
@@ -1,3 +1,2 @@
node_modules/** node_modules/**
dist/.github/workflows
test/.tool-versions test/.tool-versions
+3
View File
@@ -282,6 +282,9 @@ environment variables:
- `INSTALL_DIR_FOR_GLEAM`: base folder for Gleam - `INSTALL_DIR_FOR_GLEAM`: base folder for Gleam
- `INSTALL_DIR_FOR_REBAR3`: base folder for `rebar3` - `INSTALL_DIR_FOR_REBAR3`: base folder for `rebar3`
In each of these you'll find folder `bin` where the appropriate binaries, platform-dependant,
are found (i.e. `erl`, `erl.exe`, `rebar3`, `rebar3.exe`, ...).
## Elixir Problem Matchers ## Elixir Problem Matchers
The Elixir Problem Matchers in this repository are adapted from The Elixir Problem Matchers in this repository are adapted from
+449 -431
View File
File diff suppressed because it is too large Load Diff
+515 -342
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -11,7 +11,9 @@
"shellcheck": "shellcheck .github/workflows/*.sh", "shellcheck": "shellcheck .github/workflows/*.sh",
"test": "node test/setup-beam.test.js", "test": "node test/setup-beam.test.js",
"yamllint": "yamllint .github/workflows/**.yml && yamllint .*.yml && yamllint *.yml", "yamllint": "yamllint .github/workflows/**.yml && yamllint .*.yml && yamllint *.yml",
"build-dist": "rm -rf ./dist && npm install && npm run build && npm run format && npm run markdownlint && npm run shellcheck && npm run yamllint && npm run jslint" "clean-dist": "rm -rf ./dist",
"lint": "npm run markdownlint && npm run shellcheck && npm run yamllint && npm run jslint",
"build-dist": "npm run clean-dist && npm install && npm run build && npm run format && npm run lint"
}, },
"dependencies": { "dependencies": {
"@actions/core": "1.10.0", "@actions/core": "1.10.0",
+16 -9
View File
@@ -135,7 +135,6 @@ async function maybeInstallGleam(gleamSpec) {
core.startGroup(`Installing Gleam ${gleamVersion}`) core.startGroup(`Installing Gleam ${gleamVersion}`)
await install('gleam', { toolVersion: gleamVersion }) await install('gleam', { toolVersion: gleamVersion })
core.setOutput('gleam-version', gleamVersion) core.setOutput('gleam-version', gleamVersion)
core.addPath(`${process.env.RUNNER_TEMP}/.setup-beam/gleam/bin`)
core.endGroup() core.endGroup()
installed = true installed = true
@@ -156,7 +155,6 @@ async function maybeInstallRebar3(rebar3Spec) {
core.startGroup(`Installing rebar3 ${rebar3Version}`) core.startGroup(`Installing rebar3 ${rebar3Version}`)
await install('rebar3', { toolVersion: rebar3Version }) await install('rebar3', { toolVersion: rebar3Version })
core.setOutput('rebar3-version', rebar3Version) core.setOutput('rebar3-version', rebar3Version)
core.addPath(`${process.env.RUNNER_TEMP}/.setup-beam/rebar3/bin`)
core.endGroup() core.endGroup()
installed = true installed = true
@@ -954,16 +952,25 @@ async function installTool(opts) {
core.debug(` ... it is, at ${cachePath}`) core.debug(` ... it is, at ${cachePath}`)
} }
core.debug('Performing post extract operations...') // This makes sure we run, e.g. in Windows, the installer in the runner
await platformOpts.postExtract(cachePath) // We're not caching the install, just the downloaded tool
const runnerToolPath = path.join(
process.env.RUNNER_TEMP,
'.setup-beam',
toolName,
)
fs.cpSync(cachePath, runnerToolPath, { recursive: true })
core.debug(`Adding ${cachePath}'s bin to system path`) core.debug('Performing post extract operations...')
const catchPathBin = path.join(cachePath, 'bin') await platformOpts.postExtract(runnerToolPath)
core.addPath(catchPathBin)
core.debug(`Adding ${runnerToolPath}' bin to system path`)
const runnerToolPathBin = path.join(runnerToolPath, 'bin')
core.addPath(runnerToolPathBin)
const installDirForVarName = `INSTALL_DIR_FOR_${toolName}`.toUpperCase() const installDirForVarName = `INSTALL_DIR_FOR_${toolName}`.toUpperCase()
core.debug(`Exporting ${installDirForVarName} as ${catchPathBin}`) core.debug(`Exporting ${installDirForVarName} as ${runnerToolPath}`)
core.exportVariable(installDirForVarName, catchPathBin) core.exportVariable(installDirForVarName, runnerToolPath)
core.info(`Installed ${installOpts.tool} version`) core.info(`Installed ${installOpts.tool} version`)
const [cmd, args] = platformOpts.reportVersion() const [cmd, args] = platformOpts.reportVersion()