Compare commits
No commits in common. "e46a0e37af7c2bb3632f07ea33dccf95770938e2" and "b0235161626863bdaae0e8f91557e811862edccc" have entirely different histories.
e46a0e37af
...
b023516162
|
|
@ -1,2 +1,2 @@
|
||||||
[alias]
|
[alias]
|
||||||
runs = "run -- paper --config data/config --backup data/backups --world data/worlds --jar data/paper.jar"
|
runs = "run -- paper 1.19.4-545 --config data/config --backup data/backups --world data/worlds data/paper-1.19.4-545.jar"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
matrix:
|
matrix:
|
||||||
PLATFORM:
|
PLATFORM:
|
||||||
- 'linux/amd64'
|
- 'linux/amd64'
|
||||||
- 'linux/arm64'
|
# - 'linux/arm64'
|
||||||
|
|
||||||
platform: ${PLATFORM}
|
platform: ${PLATFORM}
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
@ -20,14 +20,14 @@ pipeline:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: 'curlimages/curl'
|
image: 'plugins/gitea-release'
|
||||||
secrets:
|
secrets:
|
||||||
- gitea_password
|
- gitea_release_api_key
|
||||||
commands:
|
settings:
|
||||||
- >
|
base_url: https://git.rustybever.be
|
||||||
curl -s --fail
|
files: target/release/alex-*
|
||||||
--user "Chewing_Bever:$GITEA_PASSWORD"
|
checksum:
|
||||||
--upload-file target/release/alex
|
- sha256
|
||||||
https://git.rustybever.be/api/packages/Chewing_Bever/generic/alex/"${CI_COMMIT_TAG}"/alex-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
|
title: ${CI_COMMIT_TAG}
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased](https://git.rustybever.be/Chewing_Bever/alex/src/branch/dev)
|
## [Unreleased](https://git.rustybever.be/Chewing_Bever/alex/src/branch/dev)
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Better env var support
|
|
||||||
|
|
||||||
## [0.1.0](https://git.rustybever.be/Chewing_Bever/alex/src/tag/0.1.0)
|
## [0.1.0](https://git.rustybever.be/Chewing_Bever/alex/src/tag/0.1.0)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
48
src/main.rs
48
src/main.rs
|
|
@ -12,41 +12,19 @@ struct Cli {
|
||||||
/// Type of server
|
/// Type of server
|
||||||
type_: ServerType,
|
type_: ServerType,
|
||||||
/// Version string for the server, e.g. 1.19.4-545
|
/// Version string for the server, e.g. 1.19.4-545
|
||||||
#[arg(env = "ALEX_SERVER_VERSION")]
|
|
||||||
server_version: String,
|
server_version: String,
|
||||||
|
|
||||||
/// Server jar to execute
|
/// Server jar to execute
|
||||||
#[arg(
|
|
||||||
long,
|
|
||||||
value_name = "JAR_PATH",
|
|
||||||
default_value = "server.jar",
|
|
||||||
env = "ALEX_JAR"
|
|
||||||
)]
|
|
||||||
jar: PathBuf,
|
jar: PathBuf,
|
||||||
/// Directory where configs are stored, and where the server will run
|
|
||||||
#[arg(
|
/// Directory where configs are stored, and where the server will run [default: .]
|
||||||
long,
|
#[arg(long, value_name = "CONFIG_DIR", env = "ALEX_CONFIG_DIR")]
|
||||||
value_name = "CONFIG_DIR",
|
config: Option<PathBuf>,
|
||||||
default_value = ".",
|
/// Directory where world files will be saved [default: ../worlds]
|
||||||
env = "ALEX_CONFIG_DIR"
|
#[arg(long, value_name = "WORLD_DIR", env = "ALEX_WORLD_DIR")]
|
||||||
)]
|
world: Option<PathBuf>,
|
||||||
config: PathBuf,
|
/// Directory where backups will be stored [default: ../backups]
|
||||||
/// Directory where world files will be saved
|
#[arg(long, value_name = "BACKUP_DIR", env = "ALEX_WORLD_DIR")]
|
||||||
#[arg(
|
backup: Option<PathBuf>,
|
||||||
long,
|
|
||||||
value_name = "WORLD_DIR",
|
|
||||||
default_value = "../worlds",
|
|
||||||
env = "ALEX_WORLD_DIR"
|
|
||||||
)]
|
|
||||||
world: PathBuf,
|
|
||||||
/// Directory where backups will be stored
|
|
||||||
#[arg(
|
|
||||||
long,
|
|
||||||
value_name = "BACKUP_DIR",
|
|
||||||
default_value = "../backups",
|
|
||||||
env = "ALEX_WORLD_DIR"
|
|
||||||
)]
|
|
||||||
backup: PathBuf,
|
|
||||||
/// Java command to run the server jar with
|
/// Java command to run the server jar with
|
||||||
#[arg(long, value_name = "JAVA_CMD", default_value_t = String::from("java"), env = "ALEX_JAVA")]
|
#[arg(long, value_name = "JAVA_CMD", default_value_t = String::from("java"), env = "ALEX_JAVA")]
|
||||||
java: String,
|
java: String,
|
||||||
|
|
@ -85,9 +63,9 @@ fn main() {
|
||||||
let cmd = server::ServerCommand::new(cli.type_, &cli.server_version)
|
let cmd = server::ServerCommand::new(cli.type_, &cli.server_version)
|
||||||
.java(&cli.java)
|
.java(&cli.java)
|
||||||
.jar(cli.jar)
|
.jar(cli.jar)
|
||||||
.config(cli.config)
|
.config(cli.config.unwrap_or(".".into()))
|
||||||
.world(cli.world)
|
.world(cli.world.unwrap_or("../worlds".into()))
|
||||||
.backup(cli.backup)
|
.backup(cli.backup.unwrap_or("../backups".into()))
|
||||||
.xms(cli.xms)
|
.xms(cli.xms)
|
||||||
.xmx(cli.xmx)
|
.xmx(cli.xmx)
|
||||||
.max_backups(cli.max_backups);
|
.max_backups(cli.max_backups);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue