diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuild.php b/src/applications/harbormaster/storage/build/HarbormasterBuild.php --- a/src/applications/harbormaster/storage/build/HarbormasterBuild.php +++ b/src/applications/harbormaster/storage/build/HarbormasterBuild.php @@ -213,7 +213,10 @@ $artifact = HarbormasterBuildArtifact::initializeNewBuildArtifact($build_target); - $artifact->setArtifactKey($this->getPHID(), $artifact_key); + $artifact->setArtifactKey( + $this->getPHID(), + $this->getBuildGeneration(), + $artifact_key); $artifact->setArtifactType($artifact_type); $artifact->save(); return $artifact; diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php b/src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php --- a/src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php +++ b/src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php @@ -38,9 +38,9 @@ return $this->assertAttached($this->buildTarget); } - public function setArtifactKey($build_phid, $key) { + public function setArtifactKey($build_phid, $build_gen, $key) { $this->artifactIndex = - PhabricatorHash::digestForIndex($build_phid.$key); + PhabricatorHash::digestForIndex($build_phid.$build_gen.$key); $this->artifactKey = $key; return $this; }