Skip to content

Commit

Permalink
rerun build when saving on build tab (#4500)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianedwards authored Apr 4, 2024
1 parent 3e03919 commit d5c9118
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ const AppDataContainer: React.FC<AppDataContainerProps> = ({ tabParam }) => {
try {
const { variables, secrets, validatedAppProto } = await validateApp(data);

const porterUserOnBuildTab =
currentTab === "build-settings" && user?.isPorterUser;

const needsRebuild =
buildIsDirty ||
latestRevision.status === "BUILD_FAILED" ||
Expand Down Expand Up @@ -240,7 +243,10 @@ const AppDataContainer: React.FC<AppDataContainerProps> = ({ tabParam }) => {
);
}

if (latestSource.type === "github" && needsRebuild) {
if (
latestSource.type === "github" &&
(needsRebuild || porterUserOnBuildTab)
) {
// add a new revision with updated build settings only if they have changed
if (validatedAppProto.build && buildIsDirty) {
await api.updateBuildSettings(
Expand Down

0 comments on commit d5c9118

Please sign in to comment.