MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / gitTag

Function gitTag

JUCE/extras/Projucer/Source/Application/jucer_CommandLine.cpp:209–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 }
208
209 static void gitTag (const ArgumentList& args)
210 {
211 args.checkMinNumArguments (2);
212 LoadedProject proj (args[1]);
213
214 String version (proj.project->getVersionString());
215
216 if (version.trim().isEmpty())
217 ConsoleApplication::fail ("Cannot read version number from project!");
218
219 StringArray command;
220 command.add ("git");
221 command.add ("tag");
222 command.add ("-a");
223 command.add (version);
224 command.add ("-m");
225 command.add (version.quoted());
226
227 std::cout << "Performing command: " << command.joinIntoString(" ") << std::endl;
228
229 ChildProcess c;
230
231 if (! c.start (command, 0))
232 ConsoleApplication::fail ("Cannot run git!");
233
234 c.waitForProcessToFinish (10000);
235
236 if (c.getExitCode() != 0)
237 ConsoleApplication::fail ("git command failed!");
238 }
239
240 //==============================================================================
241 static void showStatus (const ArgumentList& args)

Callers 1

performCommandLineFunction · 0.85

Calls 10

checkMinNumArgumentsMethod · 0.80
quotedMethod · 0.80
joinIntoStringMethod · 0.80
startMethod · 0.65
getVersionStringMethod · 0.45
isEmptyMethod · 0.45
trimMethod · 0.45
addMethod · 0.45
getExitCodeMethod · 0.45

Tested by

no test coverage detected