Prepared for v0.1-alpha

This commit is contained in:
luca0N! 2021-03-21 18:43:25 -03:00
parent b625887a56
commit 9d31a39774
Signed by: luca0N
GPG Key ID: 2E7B4655CF16D7D6
2 changed files with 10 additions and 4 deletions

View File

@ -6,6 +6,8 @@ Dual is a simple management tool that allows you to create custom hostnames for
Make sure your configuration file [cfg/gen.cfg](cfg/gen.cfg) is correct before running this program.
Please refer to the [wiki](https://git.luca0n.com/luca0N/Dual/wiki) to learn more about this program.
```sh
$ java -jar Dual.jar
```

View File

@ -42,7 +42,7 @@ import com.luca0n.dual.config.ConfigUtil;
*/
public class Dual {
public static final String NAME = "Dual";
public static final String VERSION = "1.0";
public static final String VERSION = "0.1-alpha";
private static final String AUTO_GEN_COMMENT = "This entry was auto-generated by " + NAME + ".";
public static final int VERSION_CODE = 1;
@ -62,6 +62,7 @@ public class Dual {
public static void run() throws ConfigSyntaxException,
NoSuchNamespaceException, NoSuchKeyException, IOException,
UnsupportedOperatingSystemException, UnknownFetchTypeException {
System.out.printf("%s: started version v%s.\n", NAME, VERSION);
// Read configuration file
Config c = ConfigUtil.fromFile(ConfigUtil.DEFAULT_CONFIG);
@ -81,15 +82,15 @@ public class Dual {
else if (target == null)
throw new NoSuchKeyException("Could not find required key Dual.Target in the default configuration file.");
System.out.printf("%s: All tests passed.\n", NAME);
System.out.printf("%s: all tests passed.\n", NAME);
if (type == null){
type = "Resolve";
System.out.printf("%s: WARNING: no FetchType specified. Assuming Resolve FetchType...\n", NAME);
}
System.out.printf("%s: Using %s FetchType and %s Source.\n", NAME, type, source);
System.out.printf("%s: Using %s hostname.\n", NAME, target);
System.out.printf("%s: using %s FetchType and %s Source.\n", NAME, type, source);
System.out.printf("%s: using %s hostname.\n", NAME, target);
// Check OS.
String os = System.getProperty("os.name");
@ -182,5 +183,8 @@ public class Dual {
contents.append(line)
.append(System.lineSeparator());
Files.write(path, contents.toString().getBytes());
// Done!
System.out.printf("%s: done!\n", NAME);
}
}