mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-08-17 20:53:29 +02:00
Compare commits
15 Commits
dagger-sdk
...
feat/lint-
Author | SHA1 | Date | |
---|---|---|---|
040f97dfb8 | |||
8c66f3a076
|
|||
691ecfbf52 | |||
e921ba1363
|
|||
1638f15fba
|
|||
10bc6f3846 | |||
6e5f407432 | |||
3cb83bb79c
|
|||
|
199fe16dbf | ||
3cfd032a85
|
|||
83ae5b476a
|
|||
60dfad0aaa
|
|||
25fb9d4f24
|
|||
f42da8416a
|
|||
98781f2496
|
16
.github/workflows/ci.yaml
vendored
16
.github/workflows/ci.yaml
vendored
@@ -1,8 +1,13 @@
|
||||
name: ci
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -11,5 +16,16 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Update rust toolchain
|
||||
run: rustup update stable && rustup default stable
|
||||
- name: Set up cargo cache
|
||||
uses: actions/cache@v3
|
||||
continue-on-error: false
|
||||
with:
|
||||
path: "~/.cargo/bin/\n~/.cargo/registry/index/\n~/.cargo/registry/cache/\n~/.cargo/git/db/\ntarget/"
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cargo
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.0.0
|
||||
- name: Run dagger [CI]
|
||||
run: cargo run -p ci -- pr
|
||||
|
15
.github/workflows/lint-pr.yml
vendored
Normal file
15
.github/workflows/lint-pr.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: "Lint PR"
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- synchronize
|
||||
jobs:
|
||||
main:
|
||||
name: Validate PR title
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: amannn/action-semantic-pull-request@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
25
CHANGELOG.md
25
CHANGELOG.md
@@ -5,6 +5,31 @@ 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.8 (2023-02-19)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-f42da8416a5450c7c3c924353c3cc9112afd18f0/> with sccache
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 2 commits 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 sccache ([`f42da84`](https://github.com/kjuulh/dagger-rs/commit/f42da8416a5450c7c3c924353c3cc9112afd18f0))
|
||||
- test change ([`98781f2`](https://github.com/kjuulh/dagger-rs/commit/98781f2496deaea4bc13c9e90e60543b7daac9d7))
|
||||
</details>
|
||||
|
||||
## v0.2.7 (2023-02-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
32
Cargo.lock
generated
32
Cargo.lock
generated
@@ -114,7 +114,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"color-eyre",
|
||||
"dagger-sdk 0.2.0",
|
||||
"dagger-sdk 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"eyre",
|
||||
]
|
||||
|
||||
@@ -245,10 +245,10 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-codegen"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"dagger-core 0.2.1",
|
||||
"dagger-core 0.2.2",
|
||||
"eyre",
|
||||
"genco",
|
||||
"itertools",
|
||||
@@ -259,9 +259,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-core"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02a16b0e83ae5b88a3d4e2f3cf5149932cfcb3113e67f5579372e25d5dab5b53"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"dirs",
|
||||
@@ -283,7 +281,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-core"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7efe798e1fe0d882e335aab8928d5deaafb0d27869b69ec7e9e4686548e11753"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"dirs",
|
||||
@@ -305,12 +305,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-rs"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"color-eyre",
|
||||
"dagger-codegen",
|
||||
"dagger-core 0.2.1",
|
||||
"dagger-core 0.2.2",
|
||||
"dirs",
|
||||
"eyre",
|
||||
"flate2",
|
||||
@@ -330,17 +330,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-sdk"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e454c49b81feeb5c4057f54223cb8d7618e5d015ed835c3f3fa231fefa04e833"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"dagger-core 0.2.0",
|
||||
"dagger-core 0.2.2",
|
||||
"eyre",
|
||||
"futures",
|
||||
"genco",
|
||||
"gql_client",
|
||||
"pretty_assertions",
|
||||
"rand",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
@@ -348,16 +347,17 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-sdk"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1562df6d7d47fbb891331896ec9c04da1db129c1a9f073c40c33ab918f06e99"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"dagger-core 0.2.1",
|
||||
"dagger-core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"eyre",
|
||||
"futures",
|
||||
"genco",
|
||||
"gql_client",
|
||||
"pretty_assertions",
|
||||
"rand",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-rs"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
@@ -19,8 +19,8 @@ members = [
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
dagger-codegen = { path = "crates/dagger-codegen", version = "^0.2.1" }
|
||||
dagger-core = { path = "crates/dagger-core", version = "^0.2.1" }
|
||||
dagger-codegen = { path = "crates/dagger-codegen", version = "^0.2.2" }
|
||||
dagger-core = { path = "crates/dagger-core", version = "^0.2.2" }
|
||||
|
||||
clap = "4.1.6"
|
||||
dirs = "4.0.0"
|
||||
|
@@ -8,5 +8,5 @@ edition = "2021"
|
||||
[dependencies]
|
||||
clap = "4.1.6"
|
||||
color-eyre = "0.6.2"
|
||||
dagger-sdk = "0.2.0"
|
||||
dagger-sdk = "0.2.2"
|
||||
eyre = "0.6.8"
|
||||
|
@@ -97,11 +97,66 @@ fn get_dependencies(client: Arc<Query>) -> Container {
|
||||
|
||||
let cache_cargo_index_dir = client.cache_volume("cargo_index".into());
|
||||
let cache_cargo_deps = client.cache_volume("cargo_deps".into());
|
||||
let cache_cargo_bin = client.cache_volume("cargo_bin_cache".into());
|
||||
|
||||
let minio_url = "https://github.com/mozilla/sccache/releases/download/v0.3.3/sccache-v0.3.3-x86_64-unknown-linux-musl.tar.gz".into();
|
||||
|
||||
let base_image = client
|
||||
.container(None)
|
||||
.from("rust:latest".into())
|
||||
.with_workdir("app".into())
|
||||
.with_exec(vec!["apt-get".into(), "update".into()], None)
|
||||
.with_exec(
|
||||
vec![
|
||||
"apt-get".into(),
|
||||
"install".into(),
|
||||
"--yes".into(),
|
||||
"libpq-dev".into(),
|
||||
"wget".into(),
|
||||
],
|
||||
None,
|
||||
)
|
||||
.with_exec(vec!["wget".into(), minio_url], None)
|
||||
.with_exec(
|
||||
vec![
|
||||
"tar".into(),
|
||||
"xzf".into(),
|
||||
"sccache-v0.3.3-x86_64-unknown-linux-musl.tar.gz".into(),
|
||||
],
|
||||
None,
|
||||
)
|
||||
.with_exec(
|
||||
vec![
|
||||
"mv".into(),
|
||||
"sccache-v0.3.3-x86_64-unknown-linux-musl/sccache".into(),
|
||||
"/usr/local/bin/sccache".into(),
|
||||
],
|
||||
None,
|
||||
)
|
||||
.with_exec(
|
||||
vec!["chmod".into(), "+x".into(), "/usr/local/bin/sccache".into()],
|
||||
None,
|
||||
)
|
||||
.with_env_variable("RUSTC_WRAPPER".into(), "/usr/local/bin/sccache".into())
|
||||
.with_env_variable(
|
||||
"AWS_ACCESS_KEY_ID".into(),
|
||||
std::env::var("AWS_ACCESS_KEY_ID").unwrap_or("".into()),
|
||||
)
|
||||
.with_env_variable(
|
||||
"AWS_SECRET_ACCESS_KEY".into(),
|
||||
std::env::var("AWS_SECRET_ACCESS_KEY").unwrap_or("".into()),
|
||||
)
|
||||
.with_env_variable("SCCACHE_BUCKET".into(), "sccache".into())
|
||||
.with_env_variable("SCCACHE_REGION".into(), "auto".into())
|
||||
.with_env_variable(
|
||||
"SCCACHE_ENDPOINT".into(),
|
||||
"https://api-minio.front.kjuulh.io".into(),
|
||||
)
|
||||
.with_mounted_cache("~/.cargo/bin".into(), cache_cargo_bin.id(), None)
|
||||
.with_mounted_cache("~/.cargo/registry/index".into(), cache_cargo_bin.id(), None)
|
||||
.with_mounted_cache("~/.cargo/registry/cache".into(), cache_cargo_bin.id(), None)
|
||||
.with_mounted_cache("~/.cargo/git/db".into(), cache_cargo_bin.id(), None)
|
||||
.with_mounted_cache("target/".into(), cache_cargo_bin.id(), None)
|
||||
.with_exec(
|
||||
vec!["cargo".into(), "install".into(), "cargo-chef".into()],
|
||||
None,
|
||||
|
@@ -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.2 (2023-02-19)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-6e5f4074329ab0462445b31d4153f8497c483438/> update to dagger v0.3.12
|
||||
|
||||
### 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**
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
</details>
|
||||
|
||||
## v0.2.1 (2023-02-18)
|
||||
|
||||
<csr-id-6afe141d34308f18f9d46419931d2c9b822a7aef/>
|
||||
@@ -21,7 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 34 commits contributed to the release over the course of 20 calendar days.
|
||||
- 35 commits contributed to the release over the course of 20 calendar days.
|
||||
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
|
||||
|
||||
@@ -36,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`1332bc8`](https://github.com/kjuulh/dagger-rs/commit/1332bc842ce2ea0254c651419813b63b36ca590c))
|
||||
- add changelogs ([`a064684`](https://github.com/kjuulh/dagger-rs/commit/a064684fcf80196188a57d9ff9067c0b5769fb09))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
- remove toolchain ([`f034528`](https://github.com/kjuulh/dagger-rs/commit/f03452840cf9260cd1d5e5aa8d7ee2897384c745))
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-codegen"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
@@ -11,7 +11,7 @@ publish = true
|
||||
|
||||
[dependencies]
|
||||
convert_case = "0.6.0"
|
||||
dagger-core = { path = "../dagger-core", version = "^0.2.1" }
|
||||
dagger-core = { path = "../dagger-core", version = "^0.2.2" }
|
||||
|
||||
eyre = "0.6.8"
|
||||
genco = "0.17.3"
|
||||
|
@@ -10,7 +10,7 @@ fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
||||
.map(|values| {
|
||||
values
|
||||
.into_iter()
|
||||
.map(|val| quote! { $(val.name.as_ref()) })
|
||||
.map(|val| quote! { $(val.name.as_ref()), })
|
||||
})
|
||||
.flatten()
|
||||
.collect::<Vec<_>>();
|
||||
@@ -25,7 +25,10 @@ fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
||||
}
|
||||
|
||||
pub fn render_enum(t: &FullType) -> eyre::Result<rust::Tokens> {
|
||||
let serialize = rust::import("serde", "Serialize");
|
||||
|
||||
Ok(quote! {
|
||||
#[derive($serialize)]
|
||||
pub enum $(t.name.as_ref()) {
|
||||
$(render_enum_values(t))
|
||||
}
|
||||
|
@@ -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.2 (2023-02-19)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-6e5f4074329ab0462445b31d4153f8497c483438/> update to dagger v0.3.12
|
||||
|
||||
### 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**
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
</details>
|
||||
|
||||
## v0.2.1 (2023-02-18)
|
||||
|
||||
### Bug Fixes
|
||||
@@ -15,7 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 15 commits contributed to the release over the course of 19 calendar days.
|
||||
- 16 commits contributed to the release over the course of 19 calendar days.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
|
||||
|
||||
@@ -30,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`1332bc8`](https://github.com/kjuulh/dagger-rs/commit/1332bc842ce2ea0254c651419813b63b36ca590c))
|
||||
- add changelogs ([`a064684`](https://github.com/kjuulh/dagger-rs/commit/a064684fcf80196188a57d9ff9067c0b5769fb09))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-rs/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-core"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
|
@@ -12,7 +12,7 @@ impl Engine {
|
||||
}
|
||||
|
||||
fn from_cli(&self, cfg: &Config) -> eyre::Result<(ConnectParams, Child)> {
|
||||
let cli = Downloader::new("0.3.10".into())?.get_cli()?;
|
||||
let cli = Downloader::new("0.3.12".into())?.get_cli()?;
|
||||
|
||||
let cli_session = CliSession::new();
|
||||
|
||||
|
@@ -5,6 +5,36 @@ 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.2 (2023-02-19)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-6e5f4074329ab0462445b31d4153f8497c483438/> update to dagger v0.3.12
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- <csr-id-10bc6f3846b65cc82c2fb343d8cfe921784bef1b/> fixed fmt errors
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 3 commits contributed to the release.
|
||||
- 2 commits were 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**
|
||||
- Release dagger-core v0.2.2, dagger-codegen v0.2.2, dagger-rs v0.2.8 ([`1638f15`](https://github.com/kjuulh/dagger-rs/commit/1638f15fba9d16512e8452f87b908d6dce417cd9))
|
||||
- fixed fmt errors ([`10bc6f3`](https://github.com/kjuulh/dagger-rs/commit/10bc6f3846b65cc82c2fb343d8cfe921784bef1b))
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
</details>
|
||||
|
||||
## v0.2.1 (2023-02-18)
|
||||
|
||||
### Bug Fixes
|
||||
@@ -15,7 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 39 commits contributed to the release over the course of 20 calendar days.
|
||||
- 40 commits contributed to the release over the course of 20 calendar days.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
|
||||
|
||||
@@ -30,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.1 ([`aa0c397`](https://github.com/kjuulh/dagger-rs/commit/aa0c397b15566840eb59ca6186c083f631cc460b))
|
||||
- add dagger-sdk changelog ([`11a5247`](https://github.com/kjuulh/dagger-rs/commit/11a5247933736bc6a4c5300c29599c88597fefb7))
|
||||
- Release dagger-rs v0.2.7, dagger-sdk v0.2.1 ([`20c7118`](https://github.com/kjuulh/dagger-rs/commit/20c71189f6d5d978286ee16f8e958c6045756d80))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-sdk"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
@@ -12,7 +12,7 @@ publish = true
|
||||
|
||||
[dependencies]
|
||||
base64 = "0.21.0"
|
||||
dagger-core = { path = "../dagger-core", version = "^0.2.1" }
|
||||
dagger-core = { path = "../dagger-core", version = "^0.2.2" }
|
||||
eyre = "0.6.8"
|
||||
futures = "0.3.26"
|
||||
|
||||
|
@@ -32,7 +32,7 @@ pub struct CacheVolume {
|
||||
|
||||
impl CacheVolume {
|
||||
pub fn id(&self) -> CacheId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -82,6 +82,7 @@ pub struct ContainerWithFileOpts {
|
||||
}
|
||||
pub struct ContainerWithMountedCacheOpts {
|
||||
pub source: Option<DirectoryId>,
|
||||
pub sharing: Option<CacheSharingMode>,
|
||||
}
|
||||
pub struct ContainerWithNewFileOpts {
|
||||
pub contents: Option<String>,
|
||||
@@ -112,7 +113,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn default_args(&self) -> Vec<String> {
|
||||
let query = self.selection.select("defaultArgs");
|
||||
let mut query = self.selection.select("defaultArgs");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -128,7 +129,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn entrypoint(&self) -> Vec<String> {
|
||||
let query = self.selection.select("entrypoint");
|
||||
let mut query = self.selection.select("entrypoint");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -140,7 +141,7 @@ impl Container {
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn env_variables(&self) -> Vec<EnvVariable> {
|
||||
let query = self.selection.select("envVariables");
|
||||
let mut query = self.selection.select("envVariables");
|
||||
|
||||
return vec![EnvVariable {
|
||||
proc: self.proc.clone(),
|
||||
@@ -181,7 +182,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn exit_code(&self) -> isize {
|
||||
let query = self.selection.select("exitCode");
|
||||
let mut query = self.selection.select("exitCode");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -220,7 +221,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn fs(&self) -> Directory {
|
||||
let query = self.selection.select("fs");
|
||||
let mut query = self.selection.select("fs");
|
||||
|
||||
return Directory {
|
||||
proc: self.proc.clone(),
|
||||
@@ -229,7 +230,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn id(&self) -> ContainerId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -241,7 +242,7 @@ impl Container {
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn labels(&self) -> Vec<Label> {
|
||||
let query = self.selection.select("labels");
|
||||
let mut query = self.selection.select("labels");
|
||||
|
||||
return vec![Label {
|
||||
proc: self.proc.clone(),
|
||||
@@ -250,7 +251,7 @@ impl Container {
|
||||
}];
|
||||
}
|
||||
pub fn mounts(&self) -> Vec<String> {
|
||||
let query = self.selection.select("mounts");
|
||||
let mut query = self.selection.select("mounts");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -271,7 +272,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn platform(&self) -> Platform {
|
||||
let query = self.selection.select("platform");
|
||||
let mut query = self.selection.select("platform");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -288,7 +289,7 @@ impl Container {
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn rootfs(&self) -> Directory {
|
||||
let query = self.selection.select("rootfs");
|
||||
let mut query = self.selection.select("rootfs");
|
||||
|
||||
return Directory {
|
||||
proc: self.proc.clone(),
|
||||
@@ -297,17 +298,17 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn stderr(&self) -> String {
|
||||
let query = self.selection.select("stderr");
|
||||
let mut query = self.selection.select("stderr");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn stdout(&self) -> String {
|
||||
let query = self.selection.select("stdout");
|
||||
let mut query = self.selection.select("stdout");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn user(&self) -> String {
|
||||
let query = self.selection.select("user");
|
||||
let mut query = self.selection.select("user");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -463,6 +464,9 @@ impl Container {
|
||||
if let Some(source) = opts.source {
|
||||
query = query.arg("source", source).unwrap();
|
||||
}
|
||||
if let Some(sharing) = opts.sharing {
|
||||
query = query.arg("sharing", sharing).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
return Container {
|
||||
@@ -537,6 +541,24 @@ impl Container {
|
||||
conn: self.conn.clone(),
|
||||
};
|
||||
}
|
||||
pub fn with_registry_auth(
|
||||
&self,
|
||||
address: String,
|
||||
username: String,
|
||||
secret: SecretId,
|
||||
) -> Container {
|
||||
let mut query = self.selection.select("withRegistryAuth");
|
||||
|
||||
query = query.arg("address", address).unwrap();
|
||||
query = query.arg("username", username).unwrap();
|
||||
query = query.arg("secret", secret).unwrap();
|
||||
|
||||
return Container {
|
||||
proc: self.proc.clone(),
|
||||
selection: query,
|
||||
conn: self.conn.clone(),
|
||||
};
|
||||
}
|
||||
pub fn with_rootfs(&self, id: DirectoryId) -> Container {
|
||||
let mut query = self.selection.select("withRootfs");
|
||||
|
||||
@@ -627,6 +649,17 @@ impl Container {
|
||||
conn: self.conn.clone(),
|
||||
};
|
||||
}
|
||||
pub fn without_registry_auth(&self, address: String) -> Container {
|
||||
let mut query = self.selection.select("withoutRegistryAuth");
|
||||
|
||||
query = query.arg("address", address).unwrap();
|
||||
|
||||
return Container {
|
||||
proc: self.proc.clone(),
|
||||
selection: query,
|
||||
conn: self.conn.clone(),
|
||||
};
|
||||
}
|
||||
pub fn without_unix_socket(&self, path: String) -> Container {
|
||||
let mut query = self.selection.select("withoutUnixSocket");
|
||||
|
||||
@@ -639,7 +672,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn workdir(&self) -> String {
|
||||
let query = self.selection.select("workdir");
|
||||
let mut query = self.selection.select("workdir");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -753,7 +786,7 @@ impl Directory {
|
||||
};
|
||||
}
|
||||
pub fn id(&self) -> DirectoryId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -915,12 +948,12 @@ pub struct EnvVariable {
|
||||
|
||||
impl EnvVariable {
|
||||
pub fn name(&self) -> String {
|
||||
let query = self.selection.select("name");
|
||||
let mut query = self.selection.select("name");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn value(&self) -> String {
|
||||
let query = self.selection.select("value");
|
||||
let mut query = self.selection.select("value");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -933,7 +966,7 @@ pub struct File {
|
||||
|
||||
impl File {
|
||||
pub fn contents(&self) -> String {
|
||||
let query = self.selection.select("contents");
|
||||
let mut query = self.selection.select("contents");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -945,12 +978,12 @@ impl File {
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn id(&self) -> FileId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn secret(&self) -> Secret {
|
||||
let query = self.selection.select("secret");
|
||||
let mut query = self.selection.select("secret");
|
||||
|
||||
return Secret {
|
||||
proc: self.proc.clone(),
|
||||
@@ -959,7 +992,7 @@ impl File {
|
||||
};
|
||||
}
|
||||
pub fn size(&self) -> isize {
|
||||
let query = self.selection.select("size");
|
||||
let mut query = self.selection.select("size");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -988,7 +1021,7 @@ pub struct GitRefTreeOpts {
|
||||
|
||||
impl GitRef {
|
||||
pub fn digest(&self) -> String {
|
||||
let query = self.selection.select("digest");
|
||||
let mut query = self.selection.select("digest");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1030,7 +1063,7 @@ impl GitRepository {
|
||||
};
|
||||
}
|
||||
pub fn branches(&self) -> Vec<String> {
|
||||
let query = self.selection.select("branches");
|
||||
let mut query = self.selection.select("branches");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1057,7 +1090,7 @@ impl GitRepository {
|
||||
};
|
||||
}
|
||||
pub fn tags(&self) -> Vec<String> {
|
||||
let query = self.selection.select("tags");
|
||||
let mut query = self.selection.select("tags");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1146,7 +1179,7 @@ pub struct HostVariable {
|
||||
|
||||
impl HostVariable {
|
||||
pub fn secret(&self) -> Secret {
|
||||
let query = self.selection.select("secret");
|
||||
let mut query = self.selection.select("secret");
|
||||
|
||||
return Secret {
|
||||
proc: self.proc.clone(),
|
||||
@@ -1155,7 +1188,7 @@ impl HostVariable {
|
||||
};
|
||||
}
|
||||
pub fn value(&self) -> String {
|
||||
let query = self.selection.select("value");
|
||||
let mut query = self.selection.select("value");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1168,12 +1201,12 @@ pub struct Label {
|
||||
|
||||
impl Label {
|
||||
pub fn name(&self) -> String {
|
||||
let query = self.selection.select("name");
|
||||
let mut query = self.selection.select("name");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn value(&self) -> String {
|
||||
let query = self.selection.select("value");
|
||||
let mut query = self.selection.select("value");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1186,7 +1219,7 @@ pub struct Project {
|
||||
|
||||
impl Project {
|
||||
pub fn extensions(&self) -> Vec<Project> {
|
||||
let query = self.selection.select("extensions");
|
||||
let mut query = self.selection.select("extensions");
|
||||
|
||||
return vec![Project {
|
||||
proc: self.proc.clone(),
|
||||
@@ -1195,7 +1228,7 @@ impl Project {
|
||||
}];
|
||||
}
|
||||
pub fn generated_code(&self) -> Directory {
|
||||
let query = self.selection.select("generatedCode");
|
||||
let mut query = self.selection.select("generatedCode");
|
||||
|
||||
return Directory {
|
||||
proc: self.proc.clone(),
|
||||
@@ -1204,22 +1237,22 @@ impl Project {
|
||||
};
|
||||
}
|
||||
pub fn install(&self) -> bool {
|
||||
let query = self.selection.select("install");
|
||||
let mut query = self.selection.select("install");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn name(&self) -> String {
|
||||
let query = self.selection.select("name");
|
||||
let mut query = self.selection.select("name");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn schema(&self) -> String {
|
||||
let query = self.selection.select("schema");
|
||||
let mut query = self.selection.select("schema");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn sdk(&self) -> String {
|
||||
let query = self.selection.select("sdk");
|
||||
let mut query = self.selection.select("sdk");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1278,7 +1311,7 @@ impl Query {
|
||||
};
|
||||
}
|
||||
pub fn default_platform(&self) -> Platform {
|
||||
let query = self.selection.select("defaultPlatform");
|
||||
let mut query = self.selection.select("defaultPlatform");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1325,7 +1358,7 @@ impl Query {
|
||||
};
|
||||
}
|
||||
pub fn host(&self) -> Host {
|
||||
let query = self.selection.select("host");
|
||||
let mut query = self.selection.select("host");
|
||||
|
||||
return Host {
|
||||
proc: self.proc.clone(),
|
||||
@@ -1406,12 +1439,12 @@ pub struct Secret {
|
||||
|
||||
impl Secret {
|
||||
pub fn id(&self) -> SecretId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn plaintext(&self) -> String {
|
||||
let query = self.selection.select("plaintext");
|
||||
let mut query = self.selection.select("plaintext");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1424,8 +1457,14 @@ pub struct Socket {
|
||||
|
||||
impl Socket {
|
||||
pub fn id(&self) -> SocketId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
}
|
||||
#[derive(Serialize)]
|
||||
pub enum CacheSharingMode {
|
||||
SHARED,
|
||||
PRIVATE,
|
||||
LOCKED,
|
||||
}
|
||||
|
@@ -4,7 +4,8 @@ pub mod cli;
|
||||
mod cli_generate;
|
||||
|
||||
fn main() -> eyre::Result<()> {
|
||||
// test change
|
||||
//
|
||||
|
||||
color_eyre::install().unwrap();
|
||||
|
||||
let args = std::env::args();
|
||||
|
Reference in New Issue
Block a user