Skip to content

Commit

Permalink
build: faster artifacts deploy script (#5149)
Browse files Browse the repository at this point in the history
  • Loading branch information
devversion authored and kara committed Jun 15, 2017
1 parent 734eccc commit f579ea1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions scripts/deploy/publish-build-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ publishPackage() {
rm -rf ${repoDir}
mkdir -p ${repoDir}

# Clone the repository
git clone ${repoUrl} ${repoDir}
# Clone the repository and only fetch the last commit to download less unused data.
git clone ${repoUrl} ${repoDir} --depth 1

# Copy the build files to the repository
rm -rf ${repoDir}/*
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/publish-docs-content.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ commitMessage="$(git log --oneline -n 1)"
# create directory and clone test repo
rm -rf $repoPath
mkdir -p $repoPath
git clone $repoUrl $repoPath
git clone $repoUrl $repoPath --depth 1

# Clean out repo directory and copy contents of dist/docs into it
rm -rf $repoPath/*
Expand Down
8 changes: 4 additions & 4 deletions tools/gulp/tasks/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ async function uploadPayloadResults(database: firebaseAdmin.database.Database, c
async function getPayloadResults(database: firebaseAdmin.database.Database, commitSha: string) {
const snapshot = await database.ref('payloads').child(commitSha).once('value');

if (!snapshot.exists()) {
throw `There is no payload data uploaded for SHA ${commitSha}`;
if (snapshot.exists()) {
return snapshot.val();
} else {
console.error(`There is no payload data uploaded for SHA ${commitSha}`);
}

return snapshot.val();
}

/** Gets the SHA of the commit where the payload was uploaded before this Travis Job started. */
Expand Down

0 comments on commit f579ea1

Please sign in to comment.