Added BitBucket and GitLab CIs.
More code cleanup.
This commit is contained in:
parent
c65204414d
commit
64d2328618
10 changed files with 81 additions and 19 deletions
|
@ -188,12 +188,12 @@ public class Mobibot extends PircBot {
|
|||
setVerbose(true);
|
||||
setAutoNickChange(true);
|
||||
setLogin(p.getProperty("login", getName()));
|
||||
setVersion(p.getProperty("weblog", ""));
|
||||
setVersion(ReleaseInfo.PROJECT + ' ' + ReleaseInfo.VERSION);
|
||||
// setMessageDelay(1000);
|
||||
setIdentity(p.getProperty("ident", ""), p.getProperty("ident-nick", ""), p.getProperty("ident-msg", ""));
|
||||
|
||||
// Set the URLs
|
||||
setWeblogUrl(getVersion());
|
||||
setWeblogUrl(p.getProperty("weblog", ""));
|
||||
setBacklogsUrl(Utils.ensureDir(p.getProperty("backlogs", weblogUrl), true));
|
||||
|
||||
// Set the pinboard authentication
|
||||
|
@ -404,7 +404,6 @@ public class Mobibot extends PircBot {
|
|||
}
|
||||
}
|
||||
}
|
||||
setVersion(ReleaseInfo.PROJECT + ' ' + ReleaseInfo.VERSION);
|
||||
identify();
|
||||
joinChannel();
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ class ChannelFeed(bot: Mobibot, channel: String) : AbstractCommand(bot) {
|
|||
isPrivate: Boolean
|
||||
) {
|
||||
with(getProperty(FEED_PROP)) {
|
||||
if (!this.isNullOrBlank()) {
|
||||
if (!isNullOrBlank()) {
|
||||
Thread(FeedReader(bot, sender, this)).start()
|
||||
} else {
|
||||
bot.send(sender, "There is no feed setup for this channel.", false)
|
||||
|
|
|
@ -44,8 +44,8 @@ import java.util.List;
|
|||
|
||||
public class Info extends AbstractCommand {
|
||||
private final List<String> version = List.of(
|
||||
StringUtils.capitalize(ReleaseInfo.PROJECT) + " " + ReleaseInfo.VERSION + " ("
|
||||
+ Utils.green(ReleaseInfo.WEBSITE) + ')',
|
||||
StringUtils.capitalize(ReleaseInfo.PROJECT) + " " + ReleaseInfo.VERSION
|
||||
+ " (" + Utils.green(ReleaseInfo.WEBSITE) + ')',
|
||||
"Written by " + ReleaseInfo.AUTHOR + " (" + Utils.green(ReleaseInfo.AUTHOR_URL) + ')');
|
||||
|
||||
public Info(@NotNull final Mobibot bot) {
|
||||
|
|
|
@ -42,13 +42,10 @@ import java.util.List;
|
|||
public class Versions extends AbstractCommand {
|
||||
private final List<String> verList =
|
||||
List.of("Version: " + ReleaseInfo.VERSION + " (" + Utils.isoLocalDate(ReleaseInfo.BUILDDATE) + ')',
|
||||
"Platform: " + System.getProperty("os.name") + " (" + System.getProperty("os.version") + ", "
|
||||
+ System.getProperty("os.arch") + ", " + System.getProperty("user.country") + ')',
|
||||
"Runtime: " + System.getProperty("java.runtime.name") + " (build " + System.getProperty(
|
||||
"java.runtime.version") + ')',
|
||||
"VM: " + System.getProperty("java.vm.name") + " (build " + System.getProperty("java.vm.version")
|
||||
+ ", "
|
||||
+ System.getProperty("java.vm.info") + ')');
|
||||
"Platform: " + System.getProperty("os.name") + ' ' + System.getProperty("os.version")
|
||||
+ " (" + System.getProperty("os.arch") + ')',
|
||||
"Runtime: " + System.getProperty("java.runtime.name")
|
||||
+ ' ' + System.getProperty("java.runtime.version"));
|
||||
|
||||
public Versions(@NotNull final Mobibot bot) {
|
||||
super(bot);
|
||||
|
|
|
@ -51,10 +51,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
public class TwitterTest extends LocalProperties {
|
||||
@SuppressFBWarnings("MDM")
|
||||
private String getCi() {
|
||||
if ("true".equals(System.getenv("CIRCLECI"))) {
|
||||
return "CircleCI";
|
||||
} else if ("true".equals(System.getenv("TRAVIS"))) {
|
||||
return "Travis CI";
|
||||
final String ciName = System.getenv("CI_NAME");
|
||||
if (ciName != null) {
|
||||
return ciName;
|
||||
} else {
|
||||
try {
|
||||
return InetAddress.getLocalHost().getHostName();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue