7 Commits

Author SHA1 Message Date
cuddle-please
a94fd3e68e chore(release): 0.2.0
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/tag Build is failing
continuous-integration/drone/push Build is passing
2023-08-12 19:14:42 +00:00
e2f1d79031 fix(ci): only set local url instead of insteadOf
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-08-12 21:12:45 +02:00
07c593bb08 fix(ci): trim remote_url newlines
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-08-12 21:00:58 +02:00
61c34b9fb8 fix(ci): trim remote_url newlines
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-08-12 20:57:21 +02:00
03784be431 fix(ci): repo should be ssh
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-08-12 18:54:06 +00:00
1cf349c3c6 fix(ci): make sure to run ssh as user git
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-08-12 20:26:13 +02:00
7277e06c0b chore: set fixed versions
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-08-12 20:14:27 +02:00
5 changed files with 74 additions and 38 deletions

View File

@@ -6,6 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.2.0] - 2023-08-12
### Added
- with rust build and test
- *(ci)* with internal please action
### Fixed
- *(ci)* only set local url instead of insteadOf
- *(ci)* trim remote_url newlines
- *(ci)* trim remote_url newlines
- *(ci)* repo should be ssh
- *(ci)* make sure to run ssh as user git
- ci
### Other
- set fixed versions
- *(deps)* update rust crate tokio to 1.31.0
- *(ci)* move cuddle please image to cuddle
- Add renovate.json
## [0.1.0] - 2023-08-11 ## [0.1.0] - 2023-08-11
### Added ### Added

8
Cargo.lock generated
View File

@@ -86,9 +86,9 @@ dependencies = [
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.72" version = "0.1.73"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -978,9 +978,9 @@ dependencies = [
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.19" version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]] [[package]]
name = "memchr" name = "memchr"

View File

@@ -1,9 +1,5 @@
[workspace] [workspace]
members = [ members = ["crates/*", "examples/*", "ci"]
"crates/*",
"examples/*",
"ci"
]
resolver = "2" resolver = "2"
[workspace.dependencies] [workspace.dependencies]
@@ -16,5 +12,5 @@ ci = {path = "ci"}
dagger-sdk = "0.2.22" dagger-sdk = "0.2.22"
eyre = "0.6.8" eyre = "0.6.8"
tokio = "1.31.0" tokio = "1.31.0"
dotenv = "*" dotenv = "0.15.0"
async-trait = "*" async-trait = "0.1.73"

View File

@@ -275,7 +275,6 @@ impl DaggerCuddlePlease {
args: &CuddlePleaseSrcArgs, args: &CuddlePleaseSrcArgs,
) -> eyre::Result<()> { ) -> eyre::Result<()> {
let build_image = client.container().from(&args.cuddle_image); let build_image = client.container().from(&args.cuddle_image);
let res = build_image let res = build_image
.with_secret_variable( .with_secret_variable(
"CUDDLE_PLEASE_TOKEN", "CUDDLE_PLEASE_TOKEN",
@@ -309,6 +308,7 @@ impl DaggerCuddlePlease {
contents: Some( contents: Some(
" "
Host * Host *
User git
StrictHostKeyChecking no StrictHostKeyChecking no
UserKnownHostsFile /dev/null UserKnownHostsFile /dev/null
", ",
@@ -316,8 +316,28 @@ Host *
owner: Some("root"), owner: Some("root"),
permissions: Some(700), permissions: Some(700),
}, },
) );
.with_exec(vec![
let remote_url = res
.with_exec(vec!["git", "config", "--get", "remote.origin.url"])
.stdout()
.await?;
let res = if remote_url.starts_with("http") {
let new_remote_url = format!(
"ssh://git@{}",
remote_url
.trim()
.trim_start_matches("https://")
.trim_start_matches("http://")
);
println!("new remote_url: {}", new_remote_url);
res.with_exec(vec!["git", "remote", "set-url", "origin", &new_remote_url])
} else {
res
};
let res = res.with_exec(vec![
"cuddle-please", "cuddle-please",
"release", "release",
&format!( &format!(

View File

@@ -1 +0,0 @@