56 56 | import org.eclipse.jgit.api.ResetCommand; |
57 57 | import org.eclipse.jgit.api.errors.GitAPIException; |
58 58 | import org.eclipse.jgit.revwalk.RevCommit; |
59 59 | |
60 60 | public class Builder |
61 61 | { |
62 62 | |
63 63 | public static final String LOG_FILE = "BuildTools.log.txt"; |
64 64 | public static final boolean IS_WINDOWS = System.getProperty( "os.name" ).startsWith( "Windows" ); |
65 65 | public static final File CWD = new File( "." ); |
66 - | private static boolean dontUpdate; |
67 - | private static boolean skipCompile; |
68 - | private static boolean generateSource; |
69 - | private static boolean generateDocs; |
70 - | private static boolean dev; |
71 66 | |
72 67 | public static void main(String[] args) throws Exception |
73 68 | { |
74 69 | // May be null |
75 70 | String buildVersion = Builder.class.getPackage().getImplementationVersion(); |
76 71 | int buildNumber = -1; |
77 72 | if ( buildVersion != null ) |
78 73 | { |
79 74 | String[] split = buildVersion.split( "-" ); |
80 75 | if ( split.length == 4 ) |
97 92 | OptionSpec<Void> generateDocsFlag = parser.accepts( "generate-docs" ); |
98 93 | OptionSpec<Void> devFlag = parser.accepts( "dev" ); |
99 94 | OptionSpec<String> jenkinsVersion = parser.accepts( "rev" ).withRequiredArg().defaultsTo( "latest" ); |
100 95 | |
101 96 | OptionSet options = parser.parse( args ); |
102 97 | |
103 98 | if ( options.has( disableCertFlag ) ) |
104 99 | { |
105 100 | disableHttpsCertificateCheck(); |
106 101 | } |
107 - | dontUpdate = options.has( dontUpdateFlag ); |
108 - | skipCompile = options.has( skipCompileFlag ); |
109 - | generateSource = options.has( generateSourceFlag ); |
110 - | generateDocs = options.has( generateDocsFlag ); |
111 - | dev = options.has( devFlag ); |
102 + | boolean dontUpdate = options.has(dontUpdateFlag); |
103 + | boolean skipCompile = options.has(skipCompileFlag); |
104 + | boolean generateSource = options.has(generateSourceFlag); |
105 + | boolean generateDocs = options.has(generateDocsFlag); |
106 + | boolean dev = options.has(devFlag); |
112 107 | |
113 108 | logOutput(); |
114 109 | |
115 110 | if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) < 51.0 ) |
116 111 | { |
117 112 | System.err.println( "*** WARNING *** You are not using Java 7 or above. Although this will work, it is highly discouraged due to the security issues present." ); |
118 113 | System.err.println( "*** WARNING *** Use java -version to check your version and update as soon as possible." ); |
119 114 | } |
120 115 | |
121 116 | try |