diff --git a/CHANGELOG.md b/CHANGELOG.md index a620b64..9a98ab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ 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.4.0 This is a functionality-breaking release that removes untested/extraneous parts @@ -17,9 +19,14 @@ of this project. - Simple tests for the gitea crate. - A name generator `elfs` was created for future use in integration testing. +### CHANGED + +- `release` is renamed to `cut`, but there is an alias for the old `release` + subcommand name. + ### REMOVED -- All functionality but the drone plugin and release commands +- All functionality but the drone plugin and release commands. ## 0.3.2 diff --git a/VERSION b/VERSION index d15723f..1d0ba9e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.2 +0.4.0 diff --git a/src/cmd/release.rs b/src/cmd/cut.rs similarity index 100% rename from src/cmd/release.rs rename to src/cmd/cut.rs diff --git a/src/cmd/drone_plugin.rs b/src/cmd/drone_plugin.rs index 775192e..57e1b06 100644 --- a/src/cmd/drone_plugin.rs +++ b/src/cmd/drone_plugin.rs @@ -32,7 +32,7 @@ pub(crate) async fn run(env: DroneEnv) -> Result<()> { origin.connect(git2::Direction::Fetch)?; origin.fetch(&["refs/tags/*:refs/tags/*"], None, None)?; - release::run( + cut::run( common, env.changelog_path, None, diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index e518fa4..d94fab6 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use structopt::StructOpt; +pub(crate) mod cut; pub(crate) mod drone_plugin; -pub(crate) mod release; #[derive(StructOpt, Debug, Clone)] pub(crate) struct Common { @@ -85,13 +85,9 @@ pub(crate) struct ReleaseMeta { #[derive(StructOpt, Debug)] #[structopt(about = "Gitea release assistant")] pub(crate) enum Cmd { - /// Runs the release process as a drone plugin - DronePlugin { - #[structopt(flatten)] - env: DroneEnv, - }, /// Create a new tag and release on Gitea - Release { + #[structopt(alias = "release")] + Cut { #[structopt(flatten)] common: Common, /// Changelog file to read from to create the release description @@ -102,4 +98,10 @@ pub(crate) enum Cmd { #[structopt(flatten)] release_meta: ReleaseMeta, }, + + /// Runs the release process as a drone plugin + DronePlugin { + #[structopt(flatten)] + env: DroneEnv, + }, } diff --git a/src/main.rs b/src/main.rs index 26093d8..dae376e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,12 +18,12 @@ async fn main() -> Result<()> { let cmd = cmd::Cmd::from_args(); match cmd { - Cmd::DronePlugin { env } => cmd::drone_plugin::run(env).await, - Cmd::Release { + Cmd::Cut { common, changelog, tag, release_meta, - } => cmd::release::run(common, changelog, tag, release_meta).await, + } => cmd::cut::run(common, changelog, tag, release_meta).await, + Cmd::DronePlugin { env } => cmd::drone_plugin::run(env).await, } }