Compare commits
3 Commits
3496c738de
...
bab464f8f3
| Author | SHA1 | Date | |
|---|---|---|---|
|
bab464f8f3
|
|||
|
378da0e7be
|
|||
|
50e4f8528d
|
@@ -107,6 +107,9 @@ $env.MOZ_ENABLE_WAYLAND = "1"
|
||||
$env.VOLTA_HOME = $"($env.HOME)/.volta"
|
||||
$env.CARGO_TARGET_DIR = $"($env.HOME)/.cargo/target"
|
||||
|
||||
# For the mullvadvpn-app setup-rust git hook
|
||||
$env.MULLVAD_SETUP_PLATFORM = "linux"
|
||||
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
zoxide init nushell | save -f ~/.cache/zoxide.nu
|
||||
|
||||
@@ -9,9 +9,9 @@ set custom_tag "$base_tag-extra"
|
||||
|
||||
# check if image exists
|
||||
if not podman image inspect $custom_tag >/dev/null
|
||||
echo "Building custom image"
|
||||
set tmp_dockerfile (mktemp)
|
||||
echo "
|
||||
echo "Building custom image"
|
||||
set tmp_dockerfile (mktemp)
|
||||
echo "
|
||||
FROM $base_tag
|
||||
|
||||
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y \
|
||||
@@ -37,17 +37,16 @@ RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT [\"/entrypoint.sh\"]
|
||||
|
||||
" > $tmp_dockerfile
|
||||
" >$tmp_dockerfile
|
||||
|
||||
|
||||
podman build -f $tmp_dockerfile -t $custom_tag || exit 1
|
||||
rm $tmp_dockerfile
|
||||
podman build -f $tmp_dockerfile -t $custom_tag || exit 1
|
||||
rm $tmp_dockerfile
|
||||
end
|
||||
|
||||
podman run --rm -it \
|
||||
--hostname mullpod \
|
||||
-v .:/build \
|
||||
-v cargo-target:/cargo-target:Z \
|
||||
-v cargo-registry:/root/.cargo/registry:Z \
|
||||
-v gradle-cache:/root/.gradle:Z \
|
||||
$custom_tag mold -run fish
|
||||
--hostname mullpod \
|
||||
-v .:/build \
|
||||
-v cargo-target:/cargo-target:Z \
|
||||
-v cargo-registry:/root/.cargo/registry:Z \
|
||||
-v gradle-cache:/root/.gradle:Z \
|
||||
$custom_tag fish
|
||||
|
||||
@@ -18,3 +18,26 @@ def gitfixremote [
|
||||
print $"Unknown host: ($parsed.host)"
|
||||
}
|
||||
}
|
||||
|
||||
def "git sha" [
|
||||
--no-copy(-c), # don't copy to clipboard
|
||||
--full(-f), # output the complete sha
|
||||
]: nothing -> record {
|
||||
mut sha = (git show -q | lines | parse "commit {sha}" | first);
|
||||
|
||||
if ($sha | is-empty) {
|
||||
return;
|
||||
}
|
||||
|
||||
$sha = $sha.sha
|
||||
|
||||
if not $full {
|
||||
$sha = ($sha | str substring 0..7)
|
||||
}
|
||||
|
||||
if not $no_copy {
|
||||
$sha | pbc
|
||||
}
|
||||
|
||||
$sha
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user