Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: faster artifacts deploy script #5149

Merged
merged 1 commit into from
Jun 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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