mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
overhaul context
This commit is contained in:
committed by
Aiden McClelland
parent
7b9ce88a16
commit
9fb02c6a1e
@@ -31,7 +31,7 @@ use tokio_compat_02::FutureExt;
|
||||
// pub use v0_2_12::Version as Current;
|
||||
pub type Current = ();
|
||||
|
||||
use crate::context::{CliContext, EitherContext, RpcContext};
|
||||
use crate::context::{CliContext, RpcContext};
|
||||
use crate::util::{to_yaml_async_writer, AsyncCompat};
|
||||
use crate::{Error, ResultExt as _};
|
||||
|
||||
@@ -180,7 +180,7 @@ pub async fn self_update(requirement: emver::VersionRange) -> Result<(), Error>
|
||||
}
|
||||
|
||||
#[command(rename = "git-info", local)]
|
||||
pub fn git_info(#[context] _ctx: EitherContext) -> Result<String, Error> {
|
||||
pub fn git_info() -> Result<String, Error> {
|
||||
Ok(
|
||||
git_version::git_version!(args = ["--always", "--abbrev=40", "--dirty=-modified"])
|
||||
.to_owned(),
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
use super::*;
|
||||
|
||||
const V0_2_14: emver::Version = emver::Version::new(0, 2, 14, 0);
|
||||
|
||||
pub struct Version;
|
||||
#[async_trait]
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_2_13::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> &'static emver::Version {
|
||||
&V0_2_14
|
||||
}
|
||||
async fn up(&self) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down(&self) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user