fix: rename ublue-rs to blue-build
This commit is contained in:
parent
a2e5479d65
commit
d3ff4eed93
5 changed files with 38 additions and 46 deletions
40
Cargo.lock
generated
40
Cargo.lock
generated
|
|
@ -107,6 +107,26 @@ dependencies = [
|
|||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "blue-build"
|
||||
version = "0.3.8"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cfg-if",
|
||||
"chrono",
|
||||
"clap",
|
||||
"clap-verbosity-flag",
|
||||
"derive_builder",
|
||||
"env_logger",
|
||||
"log",
|
||||
"rusty-hook",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_yaml",
|
||||
"tera",
|
||||
"typed-builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bstr"
|
||||
version = "1.9.0"
|
||||
|
|
@ -1075,26 +1095,6 @@ version = "1.17.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "ublue-rs"
|
||||
version = "0.3.7"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cfg-if",
|
||||
"chrono",
|
||||
"clap",
|
||||
"clap-verbosity-flag",
|
||||
"derive_builder",
|
||||
"env_logger",
|
||||
"log",
|
||||
"rusty-hook",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_yaml",
|
||||
"tera",
|
||||
"typed-builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ucd-trie"
|
||||
version = "0.1.6"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "ublue-rs"
|
||||
version = "0.3.7"
|
||||
name = "blue-build"
|
||||
version = "0.3.8"
|
||||
edition = "2021"
|
||||
description = "A CLI tool built for creating Containerfile templates based on the Ublue Community Project"
|
||||
repository = "https://gitlab.com/wunker-bunker/blue-build"
|
||||
|
|
|
|||
20
Earthfile
20
Earthfile
|
|
@ -3,7 +3,7 @@ IMPORT github.com/earthly/lib/rust AS rust
|
|||
|
||||
ARG --global FEDORA_MAJOR_VERSION=38
|
||||
|
||||
ARG --global IMAGE=registry.gitlab.com/wunker-bunker/ublue-cli
|
||||
ARG --global IMAGE=registry.gitlab.com/wunker-bunker/blue-build
|
||||
|
||||
iso-generator:
|
||||
FROM registry.fedoraproject.org/fedora-toolbox:${FEDORA_MAJOR_VERSION}
|
||||
|
|
@ -29,16 +29,16 @@ install:
|
|||
ARG --required TARGET
|
||||
DO rust+CARGO --args="build --release --target $TARGET" --output="$TARGET/release/[^\./]+"
|
||||
|
||||
SAVE ARTIFACT target/$TARGET/release/ublue
|
||||
SAVE ARTIFACT target/$TARGET/release/bb
|
||||
|
||||
ublue-cli:
|
||||
blue-build-cli:
|
||||
FROM registry.fedoraproject.org/fedora-toolbox:${FEDORA_MAJOR_VERSION}
|
||||
BUILD +install --TARGET="x86_64-unknown-linux-gnu"
|
||||
|
||||
RUN dnf install --refresh -y buildah podman skopeo
|
||||
|
||||
COPY +cosign/cosign /usr/bin/cosign
|
||||
COPY (+install/ublue --TARGET="x86_64-unknown-linux-gnu") /usr/bin/ublue
|
||||
COPY (+install/bb --TARGET="x86_64-unknown-linux-gnu") /usr/bin/bb
|
||||
|
||||
ARG TAG
|
||||
IF [ "$TAG" != "" ]
|
||||
|
|
@ -50,17 +50,17 @@ ublue-cli:
|
|||
SAVE IMAGE --push $IMAGE:latest
|
||||
END
|
||||
ELSE
|
||||
SAVE IMAGE ublue-cli
|
||||
SAVE IMAGE blue-build
|
||||
END
|
||||
|
||||
ublue-cli-alpine:
|
||||
blue-build-cli-alpine:
|
||||
FROM alpine
|
||||
BUILD +install --TARGET="x86_64-unknown-linux-musl"
|
||||
|
||||
RUN apk update && apk add buildah podman skopeo fuse-overlayfs
|
||||
|
||||
COPY +cosign/cosign /usr/bin/cosign
|
||||
COPY (+install/ublue --TARGET="x86_64-unknown-linux-musl") /usr/bin/ublue
|
||||
COPY (+install/bb --TARGET="x86_64-unknown-linux-musl") /usr/bin/bb
|
||||
|
||||
ARG TAG
|
||||
IF [ "$TAG" != "" ]
|
||||
|
|
@ -72,10 +72,10 @@ ublue-cli-alpine:
|
|||
SAVE IMAGE --push $IMAGE:alpine
|
||||
END
|
||||
ELSE
|
||||
SAVE IMAGE ublue-cli:alpine
|
||||
SAVE IMAGE blue-build:alpine
|
||||
END
|
||||
|
||||
all:
|
||||
BUILD +ublue-cli
|
||||
BUILD +ublue-cli-alpine
|
||||
BUILD +blue-build
|
||||
BUILD +blue-build-alpine
|
||||
BUILD +iso-generator
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
use blue_build::{self, build, template};
|
||||
use clap::{Parser, Subcommand};
|
||||
use clap_verbosity_flag::{InfoLevel, Verbosity};
|
||||
use env_logger::WriteStyle;
|
||||
use log::trace;
|
||||
use ublue_rs::{self, build, template};
|
||||
|
||||
#[cfg(feature = "init")]
|
||||
use ublue_rs::init;
|
||||
use blue_build::init;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(name = "Ublue Builder", author, version, about, long_about = None)]
|
||||
struct UblueArgs {
|
||||
#[command(name = "BlueBuild", author, version, about, long_about = None)]
|
||||
struct BlueBuildArgs {
|
||||
#[command(subcommand)]
|
||||
command: CommandArgs,
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ enum CommandArgs {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let args = UblueArgs::parse();
|
||||
let args = BlueBuildArgs::parse();
|
||||
|
||||
env_logger::builder()
|
||||
.filter_level(args.verbosity.log_level_filter())
|
||||
10
src/lib.rs
10
src/lib.rs
|
|
@ -1,12 +1,4 @@
|
|||
//! The root library for ublue-rs.
|
||||
//!
|
||||
//! This module consists of the args for the cli as well as the
|
||||
//! initial entrypoint for setting up tera to properly template
|
||||
//! the Containerfile. There is support for legacy starting point
|
||||
//! recipes using the feature flag 'legacy' and support for the newest
|
||||
//! starting point setup using the 'modules' feature flag. You will not want
|
||||
//! to use both features at the same time. For now the 'legacy' feature
|
||||
//! is the default feature until modules works 1-1 with ublue starting point.
|
||||
//! The root library for blue-build.
|
||||
|
||||
#[cfg(feature = "init")]
|
||||
pub mod init;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue