mirror of
https://github.com/DeLaGuardo/setup-clojure.git
synced 2024-12-27 00:16:21 +08:00
Rename tdeps -> cli
This commit is contained in:
parent
ee5de8c991
commit
1ecd6232d8
28
.github/workflows/smoke-tests.yml
vendored
28
.github/workflows/smoke-tests.yml
vendored
@ -4,6 +4,8 @@ on: [push]
|
||||
|
||||
jobs:
|
||||
|
||||
# Deprecated version identifier
|
||||
# Please use `cli: version` as in job `clojure-cli`
|
||||
test-tools-deps:
|
||||
|
||||
strategy:
|
||||
@ -30,6 +32,32 @@ jobs:
|
||||
- name: Execute clojure code
|
||||
run: clojure -e "(+ 1 1)"
|
||||
|
||||
clojure-cli:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, macOS-latest]
|
||||
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Prepare java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Install clojure tools-deps
|
||||
# uses: DeLaGuardo/setup-clojure@master
|
||||
uses: ./
|
||||
with:
|
||||
cli: 1.10.1.693
|
||||
|
||||
- name: Execute clojure code
|
||||
run: clojure -e "(+ 1 1)"
|
||||
|
||||
test-leiningen:
|
||||
|
||||
strategy:
|
||||
|
@ -10,7 +10,9 @@ inputs:
|
||||
boot:
|
||||
description: 'The boot-clj version to make available on the path.'
|
||||
tools-deps:
|
||||
description: 'The tools deps version to make available on the path.'
|
||||
description: '[DEPRECATED] The tools deps version to make available on the path.'
|
||||
cli:
|
||||
description: 'Clojure CLI version to make availablr on the path.'
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/index.js'
|
||||
|
31
dist/index.js
vendored
31
dist/index.js
vendored
@ -3355,31 +3355,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(__webpack_require__(470));
|
||||
const lein = __importStar(__webpack_require__(451));
|
||||
const boot = __importStar(__webpack_require__(160));
|
||||
const tdeps = __importStar(__webpack_require__(530));
|
||||
const cli = __importStar(__webpack_require__(516));
|
||||
const utils = __importStar(__webpack_require__(611));
|
||||
const IS_WINDOWS = utils.isWindows();
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const Lein = core.getInput('lein');
|
||||
const Boot = core.getInput('boot');
|
||||
const Tdeps = core.getInput('tools-deps');
|
||||
if (Lein) {
|
||||
lein.setup(Lein);
|
||||
const LEIN_VERSION = core.getInput('lein');
|
||||
const BOOT_VERSION = core.getInput('boot');
|
||||
const TDEPS_VERSION = core.getInput('tools-deps');
|
||||
const CLI_VERSION = core.getInput('cli');
|
||||
if (LEIN_VERSION) {
|
||||
lein.setup(LEIN_VERSION);
|
||||
}
|
||||
if (Boot) {
|
||||
if (BOOT_VERSION) {
|
||||
if (IS_WINDOWS) {
|
||||
throw new Error('Boot on windows is not supported yet.');
|
||||
}
|
||||
boot.setup(Boot);
|
||||
boot.setup(BOOT_VERSION);
|
||||
}
|
||||
if (Tdeps) {
|
||||
if (CLI_VERSION) {
|
||||
if (IS_WINDOWS) {
|
||||
throw new Error('Clojure CLI on windows is not supported yet.');
|
||||
}
|
||||
cli.setup(CLI_VERSION);
|
||||
}
|
||||
if (TDEPS_VERSION) {
|
||||
if (IS_WINDOWS) {
|
||||
throw new Error('Clojure tools.deps on windows is not supported yet.');
|
||||
}
|
||||
tdeps.setup(Tdeps);
|
||||
cli.setup(TDEPS_VERSION);
|
||||
}
|
||||
if (!Boot && !Lein && !Tdeps) {
|
||||
if (!BOOT_VERSION && !LEIN_VERSION && !TDEPS_VERSION && !CLI_VERSION) {
|
||||
throw new Error('You must specify at least one clojure tool.');
|
||||
}
|
||||
}
|
||||
@ -3622,7 +3629,7 @@ exports.getState = getState;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 530:
|
||||
/***/ 516:
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,36 +1,44 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as lein from './leiningen'
|
||||
import * as boot from './boot'
|
||||
import * as tdeps from './tdeps'
|
||||
import * as cli from './cli'
|
||||
import * as utils from './utils'
|
||||
|
||||
const IS_WINDOWS = utils.isWindows()
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
const Lein = core.getInput('lein')
|
||||
const Boot = core.getInput('boot')
|
||||
const Tdeps = core.getInput('tools-deps')
|
||||
const LEIN_VERSION = core.getInput('lein')
|
||||
const BOOT_VERSION = core.getInput('boot')
|
||||
const TDEPS_VERSION = core.getInput('tools-deps')
|
||||
const CLI_VERSION = core.getInput('cli')
|
||||
|
||||
if (Lein) {
|
||||
lein.setup(Lein)
|
||||
if (LEIN_VERSION) {
|
||||
lein.setup(LEIN_VERSION)
|
||||
}
|
||||
|
||||
if (Boot) {
|
||||
if (BOOT_VERSION) {
|
||||
if (IS_WINDOWS) {
|
||||
throw new Error('Boot on windows is not supported yet.')
|
||||
}
|
||||
boot.setup(Boot)
|
||||
boot.setup(BOOT_VERSION)
|
||||
}
|
||||
|
||||
if (Tdeps) {
|
||||
if (CLI_VERSION) {
|
||||
if (IS_WINDOWS) {
|
||||
throw new Error('Clojure CLI on windows is not supported yet.')
|
||||
}
|
||||
cli.setup(CLI_VERSION)
|
||||
}
|
||||
|
||||
if (TDEPS_VERSION) {
|
||||
if (IS_WINDOWS) {
|
||||
throw new Error('Clojure tools.deps on windows is not supported yet.')
|
||||
}
|
||||
tdeps.setup(Tdeps)
|
||||
cli.setup(TDEPS_VERSION)
|
||||
}
|
||||
|
||||
if (!Boot && !Lein && !Tdeps) {
|
||||
if (!BOOT_VERSION && !LEIN_VERSION && !TDEPS_VERSION && !CLI_VERSION) {
|
||||
throw new Error('You must specify at least one clojure tool.')
|
||||
}
|
||||
} catch (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user