Rename tdeps -> cli

This commit is contained in:
Kirill Chernyshov 2020-09-24 10:28:33 +02:00
parent ee5de8c991
commit 1ecd6232d8
No known key found for this signature in database
GPG Key ID: 425B3AB78FBCFBDB
6 changed files with 70 additions and 25 deletions

View File

@ -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:

View File

@ -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
View File

@ -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

File diff suppressed because one or more lines are too long

View File

@ -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) {