From 1958d635cdd4f92305c62f2f1e961d11130c0ada Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 1 Aug 2023 17:50:43 +0200 Subject: [PATCH 1/3] chore(release): 0.2.0 --- .env | 2 + CHANGELOG.md | 60 ++++++++++++++++++++ crates/cuddle-please-commands/src/command.rs | 6 +- cuddle.yaml | 8 +++ 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 .env create mode 100644 CHANGELOG.md diff --git a/.env b/.env new file mode 100644 index 0000000..bba86c7 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +CUDDLE_PLEASE_TOKEN="b52c18cab8a95d33f34b0d081440f77a2b156886" +#CUDDLE_PLEASE_DRY_RUN=true diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..171caf5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,60 @@ +# Changelog +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). + +## [Unreleased] + +## [0.2.0] - 2023-08-01 + +### Added +- add docker setup +- refactor frontend configuration +- with all the way through +- with create pull request and release +- with gitea +- with prepend as well +- add cliff +- remove tokio +- with doctor +- with git client +- with fixes +- with conventional parse +- with tags command +- add semver +- can get commit chain +- with start of environment engine +- with gitea client +- fmt +- add gitea client stub +- add tests for git setup +- split headings into local and global +- rename to cuddle_please +- add config parsing +- with basic get dir +- add mkdocs +- add base + +### Other +- release command +- add cuddle.release to this repository +- add granular docker setup +- fix checks +- chck refactor commands +- move doctor command +- fmt +- rename release command +- move gitea command into its own file +- move config list +- move gitea out of the way +- move config building out of main execution loop +- move commands and misc out of main binary package +- fmt +- check hide commands +- move cuddle-please to cuddle-please release +- remove no-vcs option (moved to a later stage if github is someday adopted +- fix clippy warnings +- clippy fix +- fix +- cleanup diff --git a/crates/cuddle-please-commands/src/command.rs b/crates/cuddle-please-commands/src/command.rs index 31c68c7..4645d47 100644 --- a/crates/cuddle-please-commands/src/command.rs +++ b/crates/cuddle-please-commands/src/command.rs @@ -90,7 +90,7 @@ impl Command { pub fn execute(self, current_dir: Option<&Path>) -> anyhow::Result<()> { let config = self.build_config(current_dir)?; let git_client = self.get_git(config.get_source())?; - let gitea_client = self.get_gitea_client(); + let gitea_client = self.get_gitea_client(&config); match &self.commands { Some(Commands::Release {}) => { @@ -139,11 +139,11 @@ impl Command { } } - fn get_gitea_client(&self) -> DynRemoteGitClient { + fn get_gitea_client(&self, config: &PleaseConfig) -> DynRemoteGitClient { match self.global.engine { cuddle_please_misc::RemoteEngine::Local => Box::new(LocalGitClient::new()), cuddle_please_misc::RemoteEngine::Gitea => Box::new(GiteaClient::new( - &self.config.api_url.clone().expect("api_url to be set"), + config.get_api_url(), self.global.token.as_deref(), )), } diff --git a/cuddle.yaml b/cuddle.yaml index dd76cb4..646e08b 100644 --- a/cuddle.yaml +++ b/cuddle.yaml @@ -7,6 +7,14 @@ vars: registry: kasperhermansen mkdocs_image: "squidfunk/mkdocs-material:9.1" +please: + project: + owner: kjuulh + repository: cuddle-please + branch: main + settings: + api_url: https://git.front.kjuulh.io + scripts: "mkdocs:new": type: shell -- 2.45.2 From 24cf136ca4aca6b9a2f2aceca3fb6b62267eb5c3 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 1 Aug 2023 17:51:46 +0200 Subject: [PATCH 2/3] feat: remove .env Signed-off-by: kjuulh --- .env | 2 -- .gitignore | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index bba86c7..0000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -CUDDLE_PLEASE_TOKEN="b52c18cab8a95d33f34b0d081440f77a2b156886" -#CUDDLE_PLEASE_DRY_RUN=true diff --git a/.gitignore b/.gitignore index 9c4c004..44911c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ target/ .cuddle/ +.env -- 2.45.2 From 45670e804249c24ffb411a56b715cc2a2e3b5489 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 1 Aug 2023 17:52:45 +0200 Subject: [PATCH 3/3] feat: zero out version Signed-off-by: kjuulh --- crates/cuddle-please-commands/src/release_command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cuddle-please-commands/src/release_command.rs b/crates/cuddle-please-commands/src/release_command.rs index 82c949e..565ef9c 100644 --- a/crates/cuddle-please-commands/src/release_command.rs +++ b/crates/cuddle-please-commands/src/release_command.rs @@ -229,6 +229,6 @@ fn parse_conventional_commits( fn get_current_version(significant_tag: Option) -> Version { let current_version = significant_tag .map(|st| Version::try_from(st).unwrap()) - .unwrap_or(Version::new(0, 1, 0)); + .unwrap_or(Version::new(0, 0, 0)); current_version } -- 2.45.2