mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-27 01:30:35 +01:00
Dedupe text
This commit is contained in:
parent
9f35ea0aec
commit
f6084a76d3
3 changed files with 11 additions and 19 deletions
13
dist/index.js
generated
vendored
13
dist/index.js
generated
vendored
|
@ -94749,6 +94749,7 @@ var ENV_DAEMON_DIR = "MAGIC_NIX_CACHE_DAEMONDIR";
|
||||||
var STATE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR";
|
var STATE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR";
|
||||||
var STATE_STARTED = "MAGIC_NIX_CACHE_STARTED";
|
var STATE_STARTED = "MAGIC_NIX_CACHE_STARTED";
|
||||||
var STARTED_HINT = "true";
|
var STARTED_HINT = "true";
|
||||||
|
var NOOP_TEXT = "Magic Nix Cache is already running, this workflow job is in noop mode. Is the Magic Nix Cache in the workflow twice?";
|
||||||
var MagicNixCacheAction = class {
|
var MagicNixCacheAction = class {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.idslib = new IdsToolbox({
|
this.idslib = new IdsToolbox({
|
||||||
|
@ -94812,9 +94813,7 @@ var MagicNixCacheAction = class {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.noopMode) {
|
if (this.noopMode) {
|
||||||
core.warning(
|
core.warning(NOOP_TEXT);
|
||||||
"Magic Nix Cache is already running, this workflow job is in noop mode."
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.daemonStarted) {
|
if (this.daemonStarted) {
|
||||||
|
@ -94937,9 +94936,7 @@ var MagicNixCacheAction = class {
|
||||||
}
|
}
|
||||||
async notifyAutoCache() {
|
async notifyAutoCache() {
|
||||||
if (this.noopMode) {
|
if (this.noopMode) {
|
||||||
core.warning(
|
core.debug(NOOP_TEXT);
|
||||||
"Magic Nix Cache is already running, this workflow job is in noop mode."
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.daemonStarted) {
|
if (!this.daemonStarted) {
|
||||||
|
@ -94959,9 +94956,7 @@ var MagicNixCacheAction = class {
|
||||||
}
|
}
|
||||||
async tearDownAutoCache() {
|
async tearDownAutoCache() {
|
||||||
if (this.noopMode) {
|
if (this.noopMode) {
|
||||||
core.warning(
|
core.warning(NOOP_TEXT);
|
||||||
"Magic Nix Cache is already running, this workflow job is in noop mode."
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.daemonStarted) {
|
if (!this.daemonStarted) {
|
||||||
|
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
15
src/index.ts
15
src/index.ts
|
@ -19,6 +19,9 @@ const STATE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR";
|
||||||
const STATE_STARTED = "MAGIC_NIX_CACHE_STARTED";
|
const STATE_STARTED = "MAGIC_NIX_CACHE_STARTED";
|
||||||
const STARTED_HINT = "true";
|
const STARTED_HINT = "true";
|
||||||
|
|
||||||
|
const NOOP_TEXT =
|
||||||
|
"Magic Nix Cache is already running, this workflow job is in noop mode. Is the Magic Nix Cache in the workflow twice?";
|
||||||
|
|
||||||
class MagicNixCacheAction {
|
class MagicNixCacheAction {
|
||||||
idslib: IdsToolbox;
|
idslib: IdsToolbox;
|
||||||
private client: Got;
|
private client: Got;
|
||||||
|
@ -98,9 +101,7 @@ class MagicNixCacheAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.noopMode) {
|
if (this.noopMode) {
|
||||||
actionsCore.warning(
|
actionsCore.warning(NOOP_TEXT);
|
||||||
"Magic Nix Cache is already running, this workflow job is in noop mode.",
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,9 +259,7 @@ class MagicNixCacheAction {
|
||||||
|
|
||||||
async notifyAutoCache(): Promise<void> {
|
async notifyAutoCache(): Promise<void> {
|
||||||
if (this.noopMode) {
|
if (this.noopMode) {
|
||||||
actionsCore.warning(
|
actionsCore.debug(NOOP_TEXT);
|
||||||
"Magic Nix Cache is already running, this workflow job is in noop mode.",
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,9 +284,7 @@ class MagicNixCacheAction {
|
||||||
|
|
||||||
async tearDownAutoCache(): Promise<void> {
|
async tearDownAutoCache(): Promise<void> {
|
||||||
if (this.noopMode) {
|
if (this.noopMode) {
|
||||||
actionsCore.warning(
|
actionsCore.warning(NOOP_TEXT);
|
||||||
"Magic Nix Cache is already running, this workflow job is in noop mode.",
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue