Skip to content

Commit

Permalink
Add short forms for all of the command-line options (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Aug 13, 2021
1 parent af8d014 commit 11c1b8f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ Most images are based on Debian, making use of `debootstrap` to provide a quick
This repository contains the scripts to build the rootfs images.
The other configuration files for Base Julia CI are located in the [`.buildkite`](https://github.com/JuliaLang/julia/tree/master/.buildkite) directory in the [Julia](https://github.com/JuliaLang/julia) repository.

## Instantiating the environment

```
julia --project -e 'import Pkg; Pkg.instantiate()'
```

## Testing out a rootfs image

If you want to test a rootfs image locally, you can use the `test_roofs.jl` script, passing in the URL of the rootfs you want to test. It will drop you into a shell within the build environment, where you can recreate build failures more reliably.

To see the help, run:
```
julia --project test_roofs.jl --help
```
2 changes: 1 addition & 1 deletion src/build/args.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function parse_build_args(args::AbstractVector, file::AbstractString)
description = "Build a rootfs image",
)
ArgParse.@add_arg_table! settings begin
"--arch"
"--arch", "-a"
arg_type = String
required = true
help = "The architecture for which you would like to build"
Expand Down
6 changes: 3 additions & 3 deletions src/test_and_run/args.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ function parse_test_args(args::AbstractVector, file::AbstractString)
)
default_command = "/bin/bash"
ArgParse.@add_arg_table! settings begin
"--url"
"--url", "-u"
required = false
default = ""
help = "URL from which to download the rootfs image"
"--treehash"
"--treehash", "-t"
required = false
default = ""
help = "Tree hash of the rootfs image"
"command"
required = false
default = Any[]
nargs = 'R' # all remaining tokens
nargs = 'R' # 'R' = all remaining tokens
help = "The command to run. If not specified, defaults to $(default_command)"
end
parsed_args = ArgParse.parse_args(args, settings)
Expand Down

0 comments on commit 11c1b8f

Please sign in to comment.