| 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) |
no test coverage detected