reworked examples

main
Michal 2 years ago
parent 671a5d37b2
commit 3c31cb5c89

6
.gitignore vendored

@ -2,5 +2,7 @@
.idea .idea
.direnv .direnv
example*/* examples/workspace/*
!example*/mlc.toml examples/repository/*
!examples/workspace/mlc.toml
!examples/repository/mlc.toml

@ -0,0 +1,24 @@
[base]
mode = "repository"
smart_pull = true
[mode.repository]
name = "repository-test"
build_on_update = true
[mode.repository.signing]
enabled = true
key = "michal@tar.black"
on_gen = true
[mode.workspace]
[repositories]
name = [
"1::crystal-keyring",
"2::pfetch!",
]
urls = [
"https://github.com/crystal-linux/%repo%",
"https://github.com/crystal-linux/pkgbuild.%repo%",
]

@ -9,4 +9,5 @@ pub enum AppExitCode {
NoPkgs = 8, NoPkgs = 8,
ConfigParseError = 9, ConfigParseError = 9,
NoPackagesFound = 10, NoPackagesFound = 10,
InvalidRepo = 11,
} }

@ -81,6 +81,14 @@ pub fn generate(verbose: bool) {
.wait() .wait()
.unwrap(); .unwrap();
// This should never happen, crash and burn if it does
if zst.success() && xz.success() {
crash!(
AppExitCode::InvalidRepo,
"Both .tar.zst and .tar.xz files found in repository. You've done something wrong. Aborting"
);
}
// Ensuring aarch64/ALARM support for the future // Ensuring aarch64/ALARM support for the future
let aarch64_mode = if zst.success() { let aarch64_mode = if zst.success() {
false false

Loading…
Cancel
Save