Merge branch 'main' into ci-fixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{ fetchgit }:
|
||||
fetchgit {
|
||||
url = "https://git.clan.lol/clan/clan-core.git";
|
||||
rev = "0989bbca36188a4ac78144aec819dfb231e8bede";
|
||||
sha256 = "1lmz97pjmp7cf7b1zrz4i0x210qgi41np9600idfj4202hp2pz6y";
|
||||
rev = "f512f0a949a53ff08edbd701b8b045f80b1d6b75";
|
||||
sha256 = "0g4mz0xlya218dblkgjy37r4mj28dmd57ywj5qclii2sly4i6vzk";
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]"
|
||||
>
|
||||
<InstallMachine
|
||||
name={machineName()}
|
||||
targetHost={getValue(formStore, "machine.deploy.targetHost")}
|
||||
machine={props.initialData}
|
||||
/>
|
||||
<InstallMachine name={machineName()} machine={props.initialData} />
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -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=$?;
|
||||
|
||||
Reference in New Issue
Block a user