Skip to content

Commit

Permalink
Add version logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitri-mcguckin committed Oct 4, 2021
1 parent 2dfd510 commit 5d74232
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<url>https://github.com/spicule-kythera/magnesium-script</url>
<groupId>uk.co.spicule</groupId>
<artifactId>magnesium-script</artifactId>
<version>0.1.4</version>
<version>0.1.5</version>

<!-- License -->
<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,26 @@ protected static BrowserType stringToEnum(String name) throws Expression.Invalid
}
}

// Static things
private static WebDriver driver = null;
public final static Logger LOG = LoggerFactory.getLogger(MagnesiumScript.class);
static ArgumentParser parser = ArgumentParsers.newFor("MagnesiumScript").build()
.description("A Domain-Specific-Language for creating expressive and simple automation scripts " +
"for Selenium-based web-agents.")
.defaultHelp(true);
private static final int MAJOR = 0;
private static final int MINOR = 1;
private static final int PATCH = 5;

public MagnesiumScript(WebDriver driver) {
LOG.info(version());
MagnesiumScript.driver = driver;
}

public static final String version() {
return "MagnesiumScript v" + MAJOR + "." + MINOR + "." + PATCH;
}

/**
* Opens a file and performs a lexical analysis depending on the file
* type, then proceeds parse the contents iff no lexical errors occur.
Expand Down

0 comments on commit 5d74232

Please sign in to comment.