if not os.path.isdir(output_dir): output_stream.write("'{}' does not exist.\n".format(output_dir)) else: filenames = [ "Compiler.ConditionalInvocationQueryMixin.data", "CppToJson_PythonJsonSerialization.py", ] output_stream.write("Removing content in '{}'...".format(output_dir)) with StreamDecorator(output_stream).DoneManager(): for filename in filenames: filename = os.path.join(output_dir, filename) FileSystem.RemoveFile(filename) return 0 # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- if __name__ == "__main__": try: sys.exit( BuildImpl.Main( BuildImpl.Configuration( "SchemaCodeGenerator", requires_output_dir=False, ), ), ) except KeyboardInterrupt: pass
for dir in dirs[1:]: if not os.path.isdir(dir): return False these_relative_files = GetRelativeFiles(dir) if these_relative_files != oracle: output_stream.write( "The files in '{}' do not match the files in '{}'.\n".format(dir, dirs[0]), ) return False return True # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- if __name__ == "__main__": try: sys.exit( BuildImpl.Main( BuildImpl.Configuration( "SharedLibrary", configurations=CONFIGURATIONS, ), ), ) except KeyboardInterrupt: pass
# ---------------------------------------------------------------------- APPLICATION_NAME = "Docker_Common_SimpleSchemaGenerator" Build = DockerBuildImpl.CreateRepositoryBuildFunc( "Common_SimpleSchemaGenerator", os.path.join(_script_dir, "..", ".."), "dbrownell", "common_simpleschemagenerator", "dbrownell/common_environmentex:base", "David Brownell <*****@*****.**>", repository_source_excludes=[], repository_activation_configurations=[], ) Clean = DockerBuildImpl.CreateRepositoryCleanFunc() # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- if __name__ == "__main__": try: sys.exit( BuildImpl.Main( BuildImpl.Configuration( name=APPLICATION_NAME, requires_output_dir=False, ), ), ) except KeyboardInterrupt: pass
# ---------------------------------------------------------------------- @CommandLine.EntryPoint @CommandLine.Constraints( output_stream=None, ) def Clean(output_stream=sys.stdout, ): with StreamDecorator(output_stream).DoneManager( line_prefix="", prefix="\nResults: ", suffix="\n", ) as dm: FileSystem.RemoveTree(os.path.join(_script_dir, "..", "GeneratedCode")) return dm.result # --------------------------------------------------------------------------- # --------------------------------------------------------------------------- # --------------------------------------------------------------------------- if __name__ == "__main__": try: sys.exit( BuildImpl.Main( BuildImpl.Configuration( name="SimpleSchemaGenerator_Grammar_Build", requires_output_dir=False, priority=1, ), ), ) except KeyboardInterrupt: pass
dm.result = Process.Execute(command_line, dm.stream) if dm.result != 0: return dm.result return dm.result # ---------------------------------------------------------------------- @CommandLine.EntryPoint() @CommandLine.Constraints( output_stream=None, ) def Clean(output_stream=sys.stdout, ): output_stream.write("Clean functionality is not enabled for this build.\n") return 0 # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- if __name__ == "__main__": try: sys.exit( BuildImpl.Main( BuildImpl.Configuration( "clang-formatProxy", requires_output_dir=False, ), ), ) except KeyboardInterrupt: pass
# ---------------------------------------------------------------------- @CommandLine.EntryPoint @CommandLine.Constraints( output_dir=CommandLine.DirectoryTypeInfo(ensure_exists=False), output_stream=None, ) def Clean( output_dir, output_stream=sys.stdout, ): if not os.path.isdir(output_dir): output_stream.write("'{}' does not exist.\n".format(output_dir)) return 0 output_stream.write("Removing '{}'...".format(output_dir)) with StreamDecorator(output_stream).DoneManager(): FileSystem.RemoveTree(output_dir) return 0 # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- if __name__ == "__main__": try: sys.exit(BuildImpl.Main(BuildImpl.Configuration("Backup", ))) except KeyboardInterrupt: pass
line_prefix="", prefix="\nResults: ", suffix="\n", ) as dm: output_dir = os.path.join(_script_dir, "..", "GeneratedCode") if not os.path.isdir(output_dir): dm.stream.write( "The output dir '{}' does not exist.\n".format(output_dir)) return dm.result dm.stream.write("Removing '{}'...".format(output_dir)) with dm.stream.DoneManager() as this_dm: FileSystem.RemoveTree(output_dir) return dm.result # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- if __name__ == "__main__": try: sys.exit( BuildImpl.Main( BuildImpl.Configuration( "CodeCoverageFilter", requires_output_dir=False, ), ), ) except KeyboardInterrupt: pass
tag=None, ): dm.stream.write("Retrieving image id...") with dm.stream.DoneManager() as this_dm: this_dm.result, output = Process.Execute( "docker images {}{} --quiet".format( image_name, ":{}".format(tag) if tag else "", ), ) if this_dm.result != 0: this_dm.stream.write(output) return None lines = output.strip().split("\n") return lines[0] # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- if __name__ == "__main__": try: sys.exit( BuildImpl.Main( BuildImpl.Configuration( "universal_linux_build", requires_output_dir=False, ), ), ) except KeyboardInterrupt: pass