pub struct InstallScript {
pub name: String,
pub app: String,
pub repo: String,
pub about: Vec<String>,
pub after: String,
pub after_sh: String,
pub done: String,
}Expand description
The install scripts for an app: render is
install.ps1 for Windows, render_sh is install.sh
for macOS and Linux. Each downloads the latest release’s build for the
machine, checks it against the release’s manifest.json, puts bin on
the user’s PATH and runs <app> install.
Keep the scripts in the repo and test that they’re current, so a change here shows up as a failing test rather than a stale installer:
let script = abalone::install::InstallScript::new("My App", "my-app", "me/my-app");
assert!(script.render().contains("$Repo = 'me/my-app'"));
assert!(script.render_sh().contains("REPO='me/my-app'"));Fields§
§name: StringThe name people see: Vantage.
app: StringThe exe without .exe: vantage.
repo: Stringowner/repo on GitHub.
about: Vec<String>More for the comment at the top, a line each.
after: StringPowerShell run after <app> install succeeds, indented 4 spaces.
after_sh: StringShell run after <app> install succeeds (in install.sh).
done: StringThe last thing it says.
Implementations§
Trait Implementations§
Source§impl Clone for InstallScript
impl Clone for InstallScript
Auto Trait Implementations§
impl Freeze for InstallScript
impl RefUnwindSafe for InstallScript
impl Send for InstallScript
impl Sync for InstallScript
impl Unpin for InstallScript
impl UnsafeUnpin for InstallScript
impl UnwindSafe for InstallScript
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more