Skip to content

Commit

Permalink
Feature/clarify package generation process (#24324)
Browse files Browse the repository at this point in the history
  • Loading branch information
parsimeikoikai authored Jan 9, 2025
1 parent b45b6fa commit 52fbb23
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const PlatformWrapper = ({
>
Fleet command-line tool
</a>{" "}
installed:
:
</span>
)}{" "}
<span className="buttons">
Expand Down Expand Up @@ -338,6 +338,16 @@ const PlatformWrapper = ({
}
}`,
};
const getHelpTextForPackageType = (): string => {
if (packageType === "deb") {
return "Install this package to add hosts to Fleet. For CentOS, Red Hat, and Fedora Linux, use --type=rpm.";
} else if (packageType === "msi") {
return "Install this package to add hosts to Fleet. For Windows, this generates an MSI package.";
} else if (packageType === "pkg") {
return "Install this package to add hosts to Fleet.";
}
return "";
};

if (packageType === "chromeos") {
return (
Expand Down Expand Up @@ -545,11 +555,7 @@ const PlatformWrapper = ({
label={renderLabel(packageType, renderInstallerString(packageType))}
type="textarea"
value={renderInstallerString(packageType)}
helpText={`Distribute your package to add hosts to Fleet.${
packageType === "deb"
? " For CentOS, Red Hat, and Fedora Linux, use --type=rpm."
: ""
}`}
helpText={`${getHelpTextForPackageType()}`}
/>
</>
);
Expand Down

0 comments on commit 52fbb23

Please sign in to comment.