MCPcopy Create free account
hub / github.com/gotify/server / buildGoExecutable

Function buildGoExecutable

ui/src/tests/setup.ts:106–123  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

104};
105
106const buildGoExecutable = (filename: string): Promise<void> => {
107 const envGotify = process.env.GOTIFY_EXE;
108 if (envGotify) {
109 if (!fs.existsSync(testBuildPath)) {
110 fs.mkdirSync(testBuildPath, {recursive: true});
111 }
112 fs.copyFileSync(envGotify, filename);
113 process.stdout.write(`### Copying ${envGotify} to ${filename}\n`);
114 return Promise.resolve();
115 } else {
116 process.stdout.write(`### Building Gotify ${filename}\n`);
117 return new Promise((resolve) =>
118 exec(`go build -ldflags="-X main.Mode=prod" -o ${filename} ${appDotGo}`, () =>
119 resolve()
120 )
121 );
122 }
123};
124
125const startGotify = (filename: string, port: number, pluginDir: string): ChildProcess => {
126 const gotify = spawn(filename, [], {

Callers 1

newTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…