diff --git a/checks/clan-core-for-checks.nix b/checks/clan-core-for-checks.nix index 1ee2d472a..d538b1e2a 100644 --- a/checks/clan-core-for-checks.nix +++ b/checks/clan-core-for-checks.nix @@ -1,6 +1,6 @@ { fetchgit }: fetchgit { url = "https://git.clan.lol/clan/clan-core.git"; - rev = "0989bbca36188a4ac78144aec819dfb231e8bede"; - sha256 = "1lmz97pjmp7cf7b1zrz4i0x210qgi41np9600idfj4202hp2pz6y"; + rev = "f512f0a949a53ff08edbd701b8b045f80b1d6b75"; + sha256 = "0g4mz0xlya218dblkgjy37r4mj28dmd57ywj5qclii2sly4i6vzk"; } diff --git a/pkgs/tea-create-pr/script.sh b/pkgs/tea-create-pr/script.sh index 4e9ca3632..7e103b6bb 100755 --- a/pkgs/tea-create-pr/script.sh +++ b/pkgs/tea-create-pr/script.sh @@ -43,7 +43,17 @@ else : } fi -if ! treefmt --fail-on-change --no-cache; then +mapfile -t untracked < <(git ls-files --others --exclude-standard) +if [[ ${#untracked[@]} -gt 0 ]]; then + for item in "${untracked[@]}"; do + exclude_args+=("--excludes" "$item") + done + treefmt=(treefmt "${exclude_args[@]}") +else + treefmt=(treefmt) +fi + +if ! "${treefmt[@]}" --fail-on-change --no-cache; then pop exit 1 fi diff --git a/pkgs/webview-ui/app/src/routes/machines/details.tsx b/pkgs/webview-ui/app/src/routes/machines/details.tsx index 28f54f6f4..45e4b4f04 100644 --- a/pkgs/webview-ui/app/src/routes/machines/details.tsx +++ b/pkgs/webview-ui/app/src/routes/machines/details.tsx @@ -78,7 +78,6 @@ function sleep(ms: number) { } interface InstallMachineProps { name?: string; - targetHost?: string | null; machine: MachineData; } const InstallMachine = (props: InstallMachineProps) => { @@ -104,7 +103,7 @@ const InstallMachine = (props: InstallMachineProps) => { if (!curr_uri) { return; } - if (!props.name || !props.targetHost) { + if (!props.name) { return; } @@ -266,7 +265,7 @@ const InstallMachine = (props: InstallMachineProps) => { }} initial={ getValue(formStore, "1") || { - target: props.targetHost || "", + target: props.machine.machine.deploy?.targetHost || "", report: false, } } @@ -405,6 +404,9 @@ const MachineForm = (props: MachineDetailsProps) => { ), }, }); + queryClient.invalidateQueries({ + queryKey: [activeURI(), "machine", machineName(), "get_machine_details"], + }); return null; }; @@ -661,11 +663,7 @@ const MachineForm = (props: MachineDetailsProps) => { handleClose={() => setInstallModalOpen(false)} class="min-w-[600px]" > - + ); diff --git a/scripts/pre-commit b/scripts/pre-commit index 40df8ed86..ff8172afc 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -15,7 +15,19 @@ unstash() { } git stash push --quiet --keep-index --message "pre-commit" trap unstash EXIT -treefmt + +# always ignore untracked files +mapfile -t untracked < <(git ls-files --others --exclude-standard) +if [[ ${#untracked[@]} -gt 0 ]]; then + for item in "${untracked[@]}"; do + exclude_args+=("--excludes" "$item") + done + treefmt=(treefmt "${exclude_args[@]}") +else + treefmt=(treefmt) +fi +"${treefmt[@]}" + { changed=$(git diff --name-only --exit-code); status=$?;