Renamed ReleaseInfo.mustache to version.mustache.
Added deploy script.
This commit is contained in:
parent
8a945b2dc6
commit
f92f7d26b1
5 changed files with 42 additions and 65 deletions
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
package {{packageName}}
|
||||
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
import java.time.Instant
|
||||
|
||||
/**
|
||||
* Provides semantic version information.
|
||||
*
|
||||
* @author [Semantic Version Annotation Processor](https://github.com/ethauvin/semver)
|
||||
*/
|
||||
object ReleaseInfo{
|
||||
const val PROJECT = "{{project}}"
|
||||
const val VERSION = "{{version}}"
|
||||
|
||||
@JvmField
|
||||
val BUILDDATE = LocalDateTime.ofInstant(Instant.ofEpochMilli({{epoch}}L), ZoneId.systemDefault())
|
||||
|
||||
const val MAJOR = {{major}}
|
||||
const val MINOR = {{minor}}
|
||||
const val PATCH = {{patch}}
|
||||
const val BUILDMETA = "{{buildMeta}}"
|
||||
const val PRERELEASE = "{{preRelease}}"
|
||||
|
||||
const val WEBSITE = "https://www.mobitopia.org/mobibot/"
|
||||
const val AUTHOR = "Erik C. Thauvin"
|
||||
const val AUTHOR_URL = "https://erik.thauvin.net/"
|
||||
}
|
13
deploy.sh
Executable file
13
deploy.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEPLOYDIR=/home/erik/mobitopia/mobibot
|
||||
|
||||
if [ -f "deploy/mobibot.jar" ]
|
||||
then
|
||||
/bin/cp deploy/mobibot.jar $DEPLOYDIR
|
||||
rm -rf $DEPLOYDIR/lib/*.jar
|
||||
cp deploy/lib/*.jar $DEPLOYDIR/lib
|
||||
chmod 755 $DEPLOYDIR/*.jar $DEPLOYDIR/lib/*.jar
|
||||
else
|
||||
echo "mobibot.jar not found."
|
||||
fi
|
|
@ -106,7 +106,7 @@ import kotlin.system.exitProcess
|
|||
/**
|
||||
* Implements the #mobitopia bot.
|
||||
*/
|
||||
@Version(properties = "version.properties", className = "ReleaseInfo", template = "ReleaseInfo.mustache", type = "kt")
|
||||
@Version(properties = "version.properties", className = "ReleaseInfo", template = "version.mustache", type = "kt")
|
||||
class Mobibot(nickname: String, channel: String, logsDirPath: String, p: Properties) : PircBot() {
|
||||
// Commands and Modules
|
||||
private val addons = Addons()
|
||||
|
|
|
@ -2,35 +2,31 @@
|
|||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
package {{packageName}};
|
||||
package {{packageName}}
|
||||
|
||||
import java.time.*;
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
import java.time.Instant
|
||||
|
||||
/**
|
||||
* Provides semantic version information.
|
||||
*
|
||||
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
|
||||
* @author [Semantic Version Annotation Processor](https://github.com/ethauvin/semver)
|
||||
*/
|
||||
public final class {{className}} {
|
||||
public static final String PROJECT = "{{project}}";
|
||||
public static final String VERSION = "{{version}}";
|
||||
public static final LocalDateTime BUILDDATE =
|
||||
LocalDateTime.ofInstant(Instant.ofEpochMilli({{epoch}}L), ZoneId.systemDefault());
|
||||
object ReleaseInfo{
|
||||
const val PROJECT = "{{project}}"
|
||||
const val VERSION = "{{version}}"
|
||||
|
||||
public static final int MAJOR = {{major}};
|
||||
public static final int MINOR = {{minor}};
|
||||
public static final int PATCH = {{patch}};
|
||||
public static final String BUILDMETA = "{{buildMeta}}";
|
||||
public static final String PRERELEASE = "{{preRelease}}";
|
||||
@JvmField
|
||||
val BUILDDATE = LocalDateTime.ofInstant(Instant.ofEpochMilli({{epoch}}L), ZoneId.systemDefault())
|
||||
|
||||
public static final String WEBSITE = "https://www.mobitopia.org/mobibot/";
|
||||
public static final String AUTHOR = "Erik C. Thauvin";
|
||||
public static final String AUTHOR_URL = "https://erik.thauvin.net/";
|
||||
const val MAJOR = {{major}}
|
||||
const val MINOR = {{minor}}
|
||||
const val PATCH = {{patch}}
|
||||
const val BUILDMETA = "{{buildMeta}}"
|
||||
const val PRERELEASE = "{{preRelease}}"
|
||||
|
||||
/**
|
||||
* Disables the default constructor.
|
||||
*/
|
||||
private {{className}}() {
|
||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||
}
|
||||
const val WEBSITE = "https://www.mobitopia.org/mobibot/"
|
||||
const val AUTHOR = "Erik C. Thauvin"
|
||||
const val AUTHOR_URL = "https://erik.thauvin.net/"
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#Generated by the Semver Plugin for Gradle
|
||||
#Thu Apr 29 18:56:59 PDT 2021
|
||||
version.buildmeta=526
|
||||
#Thu Apr 29 19:35:53 PDT 2021
|
||||
version.buildmeta=528
|
||||
version.major=0
|
||||
version.minor=8
|
||||
version.patch=0
|
||||
version.prerelease=beta
|
||||
version.project=mobibot
|
||||
version.semver=0.8.0-beta+526
|
||||
version.semver=0.8.0-beta+528
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue