Skip to content

Commit

Permalink
impr: set defaults for lesser used config options like debug
Browse files Browse the repository at this point in the history
  • Loading branch information
cilki committed May 15, 2024
1 parent d968aa5 commit 802c8fe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
# name: goldboot-linux-x86_64.gb
# path: goldboot-linux-x86_64.gb

- if: github.event_name == 'release' && startsWith(github.event.release.tag_name, 'goldboot-v')
- if: ${{ github.event_name == 'release' && startsWith(github.event.release.tag_name, 'goldboot-v') }}
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
Expand All @@ -75,7 +75,7 @@ jobs:
asset_content_type: application/x-executable
token: ${{ secrets.GITHUB_TOKEN }}

- if: github.event_name == 'release' && startsWith(github.event.release.tag_name, 'goldboot-registry-v')
- if: ${{ github.event_name == 'release' && startsWith(github.event.release.tag_name, 'goldboot-registry-v') }}
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
path: target/release/goldboot

build-docker:
if: github.event_name == 'release'
if: ${{ github.event_name == 'release' }}
name: Build docker / ubuntu-latest
runs-on: ubuntu-latest
needs: build-linux
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ be tweaked to suit your needs. For example:
There are many ways to customize the image, but for now just build it:

```sh
goldboot build .
goldboot cast .
```

Once the build succeeds, the image will be saved to the system's library
Expand Down
18 changes: 12 additions & 6 deletions goldboot/src/foundry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub mod vnc;
pub struct ImageElement {
pub fabricators: Option<Vec<Fabricator>>,
pub mold: ImageMold,
#[serde(skip_serializing_if = "Option::is_none")]
pub pref_size: Option<String>,
pub source: ImageSource,
}
Expand Down Expand Up @@ -66,6 +67,7 @@ pub struct Foundry {
pub arch: ImageArch,

/// When set, the run will pause before each step in the boot sequence
#[serde(default, skip_serializing)]
pub debug: bool,

/// An image description
Expand All @@ -81,6 +83,10 @@ pub struct Foundry {
#[validate(length(min = 1, max = 64))]
pub name: String,

/// Don't use hardware acceleration even if available (slow)
#[serde(default, skip_serializing)]
pub no_accel: bool,

#[serde(skip_serializing_if = "Option::is_none")]
pub nvme: Option<bool>,

Expand All @@ -92,15 +98,15 @@ pub struct Foundry {
#[serde(skip_serializing)]
pub password: Option<String>,

/// Whether screenshots will be generated during the run for debugging
pub record: bool,

/// Whether the image is public
#[serde(default, skip_serializing)]
pub public: bool,

/// Don't use hardware acceleration even if available (slow)
pub no_accel: bool,
/// Whether screenshots will be generated during the run for debugging
#[serde(default, skip_serializing)]
pub record: bool,

/// The total image size in human-readable units
pub size: String,
}

Expand Down Expand Up @@ -299,7 +305,7 @@ pub enum FoundryConfigPath {

impl Default for FoundryConfigPath {
fn default() -> Self {
FoundryConfigPath::Ron(PathBuf::from("./goldboot.ron"))
FoundryConfigPath::Json(PathBuf::from("./goldboot.json"))
}
}

Expand Down

0 comments on commit 802c8fe

Please sign in to comment.