Compare commits

...

5 Commits

Author SHA1 Message Date
Joe Bellus c31cb093e6 deploy on main 2021-11-15 11:07:52 -05:00
Joe Bellus 14831209e5 update ci 2021-11-15 10:26:06 -05:00
Joe Bellus 59261afed5 update ci 2021-11-15 10:13:07 -05:00
Joe Bellus 708896b58e Added version subcommand 2021-11-15 09:57:12 -05:00
Joe Bellus dcc21964f6 Updated entrypoint 2021-11-14 16:28:50 -05:00
2 changed files with 24 additions and 14 deletions

View File

@ -12,22 +12,23 @@ test:
- cargo test
build-linux:
# only:
# - main
only:
- main
stage: build
tags:
- linux
script:
- cargo build --release
- tar -czvf conductor-linux.tar.gz target/release/conductor
- cd target/release
- tar -czvf ../../conductor-linux.tar.gz ./conductor
artifacts:
paths:
- conductor-linux.tar.gz
build-windows:
# only:
# - main
only:
- main
stage: build
tags:
- windows
@ -38,32 +39,35 @@ build-windows:
- target\release\conductor.exe
build-macos:
# only:
# - main
only:
- main
stage: build
tags:
- macos
script:
- cargo build --release
- tar -czvf conductor-macos.tar.gz target/release/conductor
- cd target/release
- tar -czvf ../../conductor-macos.tar.gz ./conductor
artifacts:
paths:
- conductor-macos.tar.gz
deploy:
upload:
only:
- main
stage: deploy
dependencies:
- build-linux
- build-windows
- build-macos
image: amazon/aws-cli
entrypoint: [""]
image:
name: amazon/aws-cli
entrypoint: [""]
tags:
- linux
script:
- ls -thora
- aws s3 cp ./conductor-linux.tar.gz s3://shared.5sigma.io/conductor/conductor-linux.tar.gz
- aws s3 cp ./conductor-linux.tar.gz s3://shared.5sigma.io/conductor/conductor-macos.tar.gz
- aws s3 cp ./conductor-macos.tar.gz s3://shared.5sigma.io/conductor/conductor-macos.tar.gz
- aws s3 cp ./target/release/conductor.exe s3://shared.5sigma.io/conductor/conductor.exe

View File

@ -12,7 +12,8 @@ mod runner;
#[actix_rt::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let app = arkham::app!()
.opt(Opt::scalar("config").long("config").desc("By default the conductor.yml config file is found in the current directory or any directory above it. It can be manually specified if it exists in a different location."));
.command(Command::new("version").handler(version).long_desc("Display version information"))
.opt(Opt::scalar("config").long("config").desc("By default the conductor.yml config file is found in the current directory or any directory above it. It can be manually specified if it exists in a different location."));
let manual_config = app
.root_context()
.ok()
@ -70,6 +71,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
fn version(_: &App, _: &arkham::Context, _: &[String]) {
println!(env!("CARGO_PKG_VERSION"));
std::process::exit(0);
}
fn run(_: &App, ctx: &arkham::Context, _: &[String]) {
if let Some(config_path) = ctx
.get_string("config")