chore(release): 0.0.1 (#4)

# 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

Reviewed-on: #4
Co-authored-by: kjuulh <contact@kjuulh.io>
Co-committed-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-08-01 15:53:50 +00:00 committed by Kasper Juul Hermansen
parent e6f84f744d
commit 52d551425a
5 changed files with 73 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
target/ target/
.cuddle/ .cuddle/
.env

60
CHANGELOG.md Normal file
View File

@ -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

View File

@ -90,7 +90,7 @@ impl Command {
pub fn execute(self, current_dir: Option<&Path>) -> anyhow::Result<()> { pub fn execute(self, current_dir: Option<&Path>) -> anyhow::Result<()> {
let config = self.build_config(current_dir)?; let config = self.build_config(current_dir)?;
let git_client = self.get_git(config.get_source())?; 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 { match &self.commands {
Some(Commands::Release {}) => { 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 { match self.global.engine {
cuddle_please_misc::RemoteEngine::Local => Box::new(LocalGitClient::new()), cuddle_please_misc::RemoteEngine::Local => Box::new(LocalGitClient::new()),
cuddle_please_misc::RemoteEngine::Gitea => Box::new(GiteaClient::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(), self.global.token.as_deref(),
)), )),
} }

View File

@ -229,6 +229,6 @@ fn parse_conventional_commits(
fn get_current_version(significant_tag: Option<Tag>) -> Version { fn get_current_version(significant_tag: Option<Tag>) -> Version {
let current_version = significant_tag let current_version = significant_tag
.map(|st| Version::try_from(st).unwrap()) .map(|st| Version::try_from(st).unwrap())
.unwrap_or(Version::new(0, 1, 0)); .unwrap_or(Version::new(0, 0, 0));
current_version current_version
} }

View File

@ -7,6 +7,14 @@ vars:
registry: kasperhermansen registry: kasperhermansen
mkdocs_image: "squidfunk/mkdocs-material:9.1" 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: scripts:
"mkdocs:new": "mkdocs:new":
type: shell type: shell