-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a job at the end of CI (only in the main repo, on the default branch or its test delegate) that deploys tip.cuelang.org built against the tip of cue-lang/cue. It does this by relying on the jobs that ran beforehand to have patched the site to work cue-lang/cue and then to have rebuilt the site successfully. Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Ic97f59fd423eaa080684f0e45d314e8fb148e49e Dispatch-Trailer: {"type":"trybot","CL":1201039,"patchset":2,"ref":"refs/changes/39/1201039/2","targetBranch":"master"}
- Loading branch information
1 parent
58ef8a5
commit f57b924
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# Usage: | ||
# tipDeploy.bash | ||
# | ||
# tipDeploy commits the current state of the working tree and force-pushes it | ||
# to the "tip" branch, which triggers a build-and-deploy of tip.cuelang.org | ||
# inside Netlify. | ||
|
||
# cd to the parent directory to that containing the script | ||
cd "$( dirname "${BASH_SOURCE[0]}" )" | ||
cd .. | ||
|
||
headShortRef=$(git rev-parse --short HEAD) | ||
|
||
git add content/**/gen_cache.cue | ||
git commit --allow-empty --message "tip.cuelang.org: $headShortRef: cache files" | ||
git add . | ||
git commit --allow-empty --message "tip.cuelang.org: $headShortRef: source changes" | ||
|
||
# A --force push is required because there's no automated *and meaningful* path | ||
# between the current state of the tip branch and the state we wish to push. | ||
# We don't lose any information by force pushing to this branch, whose only | ||
# purpose is to communicate the state that needs to be deployed and to act as a | ||
# trigger for the build inside Netlify. | ||
git push --force origin HEAD:tip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters