Skip to content

Commit

Permalink
add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
firebelley committed Jan 7, 2020
1 parent c87538b commit 5ca9fa6
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2225,6 +2225,10 @@ function main() {
core.error('You must supply the GITHUB_TOKEN environment variable.');
return 1;
}
if (!godot_1.hasExportPresets()) {
core.error('No "export_presets.cfg" found. Please be sure you have defined at least 1 export from the Godot editor.');
return 1;
}
const newVersion = yield getNewVersion();
if (!newVersion) {
core.error('Could not establish a version for the release. Please check that "base_version" is a https://semver.org/ style string.');
Expand Down
4 changes: 4 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function main() {
core.error('You must supply the GITHUB_TOKEN environment variable.');
return 1;
}
if (!godot_1.hasExportPresets()) {
core.error('No "export_presets.cfg" found. Please be sure you have defined at least 1 export from the Godot editor.');
return 1;
}
const newVersion = yield getNewVersion();
if (!newVersion) {
core.error('Could not establish a version for the release. Please check that "base_version" is a https://semver.org/ style string.');
Expand Down
Binary file modified node_modules/@zeit/ncc/dist/ncc/cli.js.cache
Binary file not shown.
Binary file modified node_modules/@zeit/ncc/dist/ncc/index.js.cache
Binary file not shown.
Binary file modified node_modules/@zeit/ncc/dist/ncc/loaders/relocate-loader.js.cache
Binary file not shown.
Binary file modified node_modules/@zeit/ncc/dist/ncc/loaders/shebang-loader.js.cache
Binary file not shown.
9 changes: 8 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as io from '@actions/io';
import * as github from '@actions/github';
import * as core from '@actions/core';
import * as semver from 'semver';
import { setupExecutable, setupTemplates, runExport, createRelease } from './godot';
import { setupExecutable, setupTemplates, runExport, createRelease, hasExportPresets } from './godot';
import * as path from 'path';
import * as os from 'os';

Expand All @@ -17,6 +17,13 @@ async function main(): Promise<number> {
return 1;
}

if (!hasExportPresets()) {
core.error(
'No "export_presets.cfg" found. Please be sure you have defined at least 1 export from the Godot editor.',
);
return 1;
}

const newVersion = await getNewVersion();
if (!newVersion) {
core.error(
Expand Down

0 comments on commit 5ca9fa6

Please sign in to comment.