Compare commits
5 Commits
ebd7d55cce
...
c31cb093e6
Author | SHA1 | Date |
---|---|---|
Joe Bellus | c31cb093e6 | |
Joe Bellus | 14831209e5 | |
Joe Bellus | 59261afed5 | |
Joe Bellus | 708896b58e | |
Joe Bellus | dcc21964f6 |
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue