Switched to the '0.14.0' CLI.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta 2020-12-07 10:49:49 +01:00 committed by Akos Kitta
parent c024a8d3d1
commit 4d5a046aa8
3 changed files with 16 additions and 4 deletions

View File

@ -119,6 +119,18 @@
"additionalProperties": false "additionalProperties": false
}, },
"additionalProperties": false "additionalProperties": false
},
"library": {
"type": "object",
"description": "Library Configuration",
"properties": {
"enable_unsafe_install": {
"type": "boolean",
"description": "Set to 'true' to enable the use of the '--git-url' and '--zip-file' flags with 'arduino-cli lib install' These are considered 'unsafe' installation methods because they allow installing files that have not passed through the Library Manager submission process."
},
"additionalProperties": false
},
"additionalProperties": false
} }
}, },
"additionalProperties": false "additionalProperties": false

View File

@ -120,7 +120,7 @@
], ],
"arduino": { "arduino": {
"cli": { "cli": {
"version": "20201201" "version": "0.14.0"
} }
} }
} }

View File

@ -66,12 +66,12 @@
const { platform } = process; const { platform } = process;
const build = path.join(__dirname, '..', 'build'); const build = path.join(__dirname, '..', 'build');
const cli = path.join(build, `arduino-cli${platform === 'win32' ? '.exe' : ''}`); const cli = path.join(build, `arduino-cli${platform === 'win32' ? '.exe' : ''}`);
const rawVersion = shell.exec(`${cli} version`).trim(); const jsonVersion = shell.exec(`${cli} version --format json`).trim();
if (!rawVersion) { if (!jsonVersion) {
shell.echo(`Could not retrieve the CLI version from ${cli}.`); shell.echo(`Could not retrieve the CLI version from ${cli}.`);
shell.exit(1); shell.exit(1);
} }
const version = rawVersion.substring(rawVersion.lastIndexOf('Commit:') + 'Commit:'.length).trim(); const version = JSON.parse(jsonVersion).VersionString;
if (version) { if (version) {
shell.echo(`>>> Checking out version: ${version}...`); shell.echo(`>>> Checking out version: ${version}...`);
if (shell.exec(`git -C ${repository} checkout ${version} -b ${version}`).code !== 0) { if (shell.exec(`git -C ${repository} checkout ${version} -b ${version}`).code !== 0) {