Compare commits

..

2 Commits

Author SHA1 Message Date
20c71189f6 Release dagger-rs v0.2.7, dagger-sdk v0.2.1 2023-02-18 16:03:59 +01:00
d72313051b fix: with test changes 2023-02-18 15:57:16 +01:00
6 changed files with 97 additions and 24 deletions

View File

@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v0.2.7 (2023-02-18)
### Bug Fixes
- <csr-id-d72313051b9b46a6eeaa909a11850b3d8fc75e81/> with test changes
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- with test changes ([`d723130`](https://github.com/kjuulh/dagger-rs/commit/d72313051b9b46a6eeaa909a11850b3d8fc75e81))
</details>
## v0.2.6 (2023-02-18)
With smart releaser

38
Cargo.lock generated
View File

@@ -114,7 +114,7 @@ version = "0.1.0"
dependencies = [
"clap",
"color-eyre",
"dagger-sdk 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dagger-sdk 0.2.0",
"eyre",
]
@@ -305,7 +305,7 @@ dependencies = [
[[package]]
name = "dagger-rs"
version = "0.2.6"
version = "0.2.7"
dependencies = [
"clap",
"color-eyre",
@@ -328,23 +328,6 @@ dependencies = [
"tempfile",
]
[[package]]
name = "dagger-sdk"
version = "0.2.0"
dependencies = [
"base64",
"dagger-core 0.2.1",
"eyre",
"futures",
"genco",
"gql_client",
"pretty_assertions",
"rand",
"serde",
"serde_json",
"tokio",
]
[[package]]
name = "dagger-sdk"
version = "0.2.0"
@@ -363,6 +346,23 @@ dependencies = [
"tokio",
]
[[package]]
name = "dagger-sdk"
version = "0.2.1"
dependencies = [
"base64",
"dagger-core 0.2.1",
"eyre",
"futures",
"genco",
"gql_client",
"pretty_assertions",
"rand",
"serde",
"serde_json",
"tokio",
]
[[package]]
name = "diff"
version = "0.1.13"

View File

@@ -1,6 +1,6 @@
[package]
name = "dagger-rs"
version = "0.2.6"
version = "0.2.7"
edition = "2021"
readme = "README.md"
license-file = "LICENSE.MIT"

View File

@@ -8,14 +8,17 @@ fn main() -> eyre::Result<()> {
let matches = clap::Command::new("ci")
.subcommand_required(true)
.subcommand(clap::Command::new("pr"))
.subcommand(clap::Command::new("release"))
.get_matches();
let client = dagger_sdk::client::connect()?;
let base = select_base_image(client.clone());
match matches.subcommand() {
Some(("pr", _)) => return validate_pr(client, base),
Some(("pr", _)) => {
let base = select_base_image(client.clone());
return validate_pr(client, base);
}
Some(("release", subm)) => return release(client, subm),
Some(_) => {
panic!("invalid subcommand selected!")
}
@@ -25,6 +28,51 @@ fn main() -> eyre::Result<()> {
}
}
fn release(client: Arc<Query>, subm: &clap::ArgMatches) -> Result<(), color_eyre::Report> {
let src_dir = client.host().directory(
".".into(),
Some(HostDirectoryOpts {
exclude: Some(vec!["target/".into()]),
include: None,
}),
);
let base_image = client
.container(None)
.from("rust:latest".into())
.with_workdir("app".into())
.with_mounted_directory("/app/".into(), src_dir.id());
let container = base_image
.with_exec(
vec![
"cargo".into(),
"install".into(),
"cargo-smart-release".into(),
],
None,
)
.with_exec(
vec![
"cargo".into(),
"smart-release".into(),
"--execute".into(),
"--allow-fully-generated-changelogs".into(),
"--no-changelog-preview".into(),
"dagger-rs".into(),
"dagger-sdk".into(),
],
None,
);
let exit = container.exit_code();
if exit != 0 {
eyre::bail!("container failed with non-zero exit code");
}
println!("released pr succeeded!");
Ok(())
}
fn get_dependencies(client: Arc<Query>) -> Container {
let cargo_dir = client.host().directory(
".".into(),

View File

@@ -1,6 +1,6 @@
[package]
name = "dagger-sdk"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
readme = "README.md"
license-file = "LICENSE.MIT"

View File

@@ -4,6 +4,7 @@ pub mod cli;
mod cli_generate;
fn main() -> eyre::Result<()> {
// test change
color_eyre::install().unwrap();
let args = std::env::args();