pare-down-functionality #7
|
@ -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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
## 0.4.0
|
## 0.4.0
|
||||||
|
|
||||||
This is a functionality-breaking release that removes untested/extraneous parts
|
This is a functionality-breaking release that removes untested/extraneous parts
|
||||||
|
@ -17,9 +19,14 @@ of this project.
|
||||||
- Simple tests for the gitea crate.
|
- Simple tests for the gitea crate.
|
||||||
- A name generator `elfs` was created for future use in integration testing.
|
- 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
|
### REMOVED
|
||||||
|
|
||||||
- All functionality but the drone plugin and release commands
|
- All functionality but the drone plugin and release commands.
|
||||||
|
|
||||||
## 0.3.2
|
## 0.3.2
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ pub(crate) async fn run(env: DroneEnv) -> Result<()> {
|
||||||
origin.connect(git2::Direction::Fetch)?;
|
origin.connect(git2::Direction::Fetch)?;
|
||||||
origin.fetch(&["refs/tags/*:refs/tags/*"], None, None)?;
|
origin.fetch(&["refs/tags/*:refs/tags/*"], None, None)?;
|
||||||
|
|
||||||
release::run(
|
cut::run(
|
||||||
common,
|
common,
|
||||||
env.changelog_path,
|
env.changelog_path,
|
||||||
None,
|
None,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
|
|
||||||
|
pub(crate) mod cut;
|
||||||
pub(crate) mod drone_plugin;
|
pub(crate) mod drone_plugin;
|
||||||
pub(crate) mod release;
|
|
||||||
|
|
||||||
#[derive(StructOpt, Debug, Clone)]
|
#[derive(StructOpt, Debug, Clone)]
|
||||||
pub(crate) struct Common {
|
pub(crate) struct Common {
|
||||||
|
@ -85,13 +85,9 @@ pub(crate) struct ReleaseMeta {
|
||||||
#[derive(StructOpt, Debug)]
|
#[derive(StructOpt, Debug)]
|
||||||
#[structopt(about = "Gitea release assistant")]
|
#[structopt(about = "Gitea release assistant")]
|
||||||
pub(crate) enum Cmd {
|
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
|
/// Create a new tag and release on Gitea
|
||||||
Release {
|
#[structopt(alias = "release")]
|
||||||
|
Cut {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
common: Common,
|
common: Common,
|
||||||
/// Changelog file to read from to create the release description
|
/// Changelog file to read from to create the release description
|
||||||
|
@ -102,4 +98,10 @@ pub(crate) enum Cmd {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
release_meta: ReleaseMeta,
|
release_meta: ReleaseMeta,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/// Runs the release process as a drone plugin
|
||||||
|
DronePlugin {
|
||||||
|
#[structopt(flatten)]
|
||||||
|
env: DroneEnv,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,12 +18,12 @@ async fn main() -> Result<()> {
|
||||||
let cmd = cmd::Cmd::from_args();
|
let cmd = cmd::Cmd::from_args();
|
||||||
|
|
||||||
match cmd {
|
match cmd {
|
||||||
Cmd::DronePlugin { env } => cmd::drone_plugin::run(env).await,
|
Cmd::Cut {
|
||||||
Cmd::Release {
|
|
||||||
common,
|
common,
|
||||||
changelog,
|
changelog,
|
||||||
tag,
|
tag,
|
||||||
release_meta,
|
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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue