//============================================================================== int performCommandLine (const String& commandLine) { StringArray args; args.addTokens (commandLine, true); args.trim(); String command (args[0]); try { if (matchArgument (command, "help")) { showHelp(); return 0; } if (matchArgument (command, "h")) { showHelp(); return 0; } if (matchArgument (command, "resave")) { resaveProject (args, false); return 0; } if (matchArgument (command, "resave-resources")) { resaveProject (args, true); return 0; } if (matchArgument (command, "set-version")) { setVersion (args); return 0; } if (matchArgument (command, "bump-version")) { bumpVersion (args); return 0; } if (matchArgument (command, "git-tag-version")) { gitTag (args); return 0; } if (matchArgument (command, "buildmodule")) { buildModules (args, false); return 0; } if (matchArgument (command, "buildallmodules")) { buildModules (args, true); return 0; } if (matchArgument (command, "status")) { showStatus (args); return 0; } if (matchArgument (command, "trim-whitespace")) { cleanWhitespace (args, false); return 0; } if (matchArgument (command, "remove-tabs")) { cleanWhitespace (args, true); return 0; } if (matchArgument (command, "tidy-divider-comments")) { tidyDividerComments (args); return 0; } if (matchArgument (command, "fix-broken-include-paths")) { fixRelativeIncludePaths (args); return 0; } } catch (const CommandLineError& error) { std::cout << error.message << std::endl << std::endl; return 1; } return commandLineNotPerformed; }
TEST(DbsParserTest, SLOW_Depository) { parse(); auto mDbsDirectory = doim::FsDirectory::obtain(testing::gResourceDirectory, "dbs"); auto depositoryObject = doim::Object::obtain(doim::Object::EType::kDepository, mDbsDirectory, "depo"); auto depo = dom::Depository::find(depositoryObject); ASSERT_NE(nullptr, depo); ASSERT_NE(nullptr, depo->gitUrl()); ASSERT_EQ("v1.2.8", depo->gitTag()); }
//============================================================================== int performCommandLine (const String& commandLine) { StringArray args; args.addTokens (commandLine, true); args.trim(); if (findArgument (args, "--lf") || findArgument (args, "-lf")) preferredLinefeed = "\n"; String command (args[0]); try { if (matchArgument (command, "help")) { showHelp(); return 0; } if (matchArgument (command, "h")) { showHelp(); return 0; } if (matchArgument (command, "resave")) { resaveProject (args, false); return 0; } if (matchArgument (command, "resave-resources")) { resaveProject (args, true); return 0; } if (matchArgument (command, "get-version")) { getVersion (args); return 0; } if (matchArgument (command, "set-version")) { setVersion (args); return 0; } if (matchArgument (command, "bump-version")) { bumpVersion (args); return 0; } if (matchArgument (command, "git-tag-version")) { gitTag (args); return 0; } if (matchArgument (command, "buildmodule")) { buildModules (args, false); return 0; } if (matchArgument (command, "buildallmodules")) { buildModules (args, true); return 0; } if (matchArgument (command, "status")) { showStatus (args); return 0; } if (matchArgument (command, "trim-whitespace")) { cleanWhitespace (args, false); return 0; } if (matchArgument (command, "remove-tabs")) { cleanWhitespace (args, true); return 0; } if (matchArgument (command, "tidy-divider-comments")) { tidyDividerComments (args); return 0; } if (matchArgument (command, "fix-broken-include-paths")) { fixRelativeIncludePaths (args); return 0; } if (matchArgument (command, "obfuscated-string-code")) { generateObfuscatedStringCode (args); return 0; } if (matchArgument (command, "encode-binary")) { encodeBinary (args); return 0; } if (matchArgument (command, "trans")) { scanFoldersForTranslationFiles (args); return 0; } if (matchArgument (command, "trans-finish")) { createFinishedTranslationFile (args); return 0; } if (matchArgument (command, "set-global-search-path")) { setGlobalPath (args); return 0; } if (matchArgument (command, "create-project-from-pip")) { createProjectFromPIP (args); return 0; } } catch (const CommandLineError& error) { std::cout << error.message << std::endl << std::endl; return 1; } return commandLineNotPerformed; }
//============================================================================== int performCommandLine (const String& commandLine) { StringArray args; args.addTokens (commandLine, true); args.trim(); String command (args[0]); if (matchArgument (command, "help")) return showHelp(); if (matchArgument (command, "h")) return showHelp(); if (matchArgument (command, "resave")) return resaveProject (args, false); if (matchArgument (command, "resave-resources")) return resaveProject (args, true); if (matchArgument (command, "set-version")) return setVersion (args); if (matchArgument (command, "bump-version")) return bumpVersion (args); if (matchArgument (command, "git-tag-version")) return gitTag (args); if (matchArgument (command, "buildmodule")) return buildModules (args, false); if (matchArgument (command, "buildallmodules")) return buildModules (args, true); if (matchArgument (command, "status")) return showStatus (args); return commandLineNotPerformed; }