-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts for automatically updating K Nighly, opening PR into repo (…
…#503) * Makefile, include.mk: hardcode the nightly URL used * scripts/update-k-nightly.sh: script for automatically updating the K nightly release version * scripts/update-k-nightly-pr.sh: script to also open the PR for you * scripts/update-k-nightly-pr: upstream branch, not remote * scripts/update-k-nightly-pr: also specify reviewer to use
- Loading branch information
Showing
4 changed files
with
45 additions
and
3 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
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,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -exuo pipefail | ||
|
||
export TOP=${TOP:-$(git rev-parse --show-toplevel)} | ||
UPSTREAM_REMOTE=${UPSTREAM_REMOTE:-origin} | ||
UPSTREAM_BRANCH=master | ||
BRANCH_NAME=update-k-nightly | ||
|
||
$TOP/scripts/git-assert-clean.sh | ||
|
||
if [[ $(git rev-parse HEAD) != $(git rev-parse $UPSTREAM_BRANCH) ]]; then | ||
echo "Must run with $UPSTREAM_BRANCH checked out!!!" | ||
exit 1 | ||
fi | ||
|
||
$TOP/scripts/update-k-nightly.sh | ||
|
||
if $TOP/scripts/git-assert-clean.sh; then | ||
echo "No update..." | ||
exit 0 | ||
fi | ||
|
||
git checkout -B "$BRANCH_NAME" "$UPSTREAM_REMOTE/$UPSTREAM_BRANCH" | ||
|
||
git add $TOP/include.mk | ||
|
||
git commit --message 'include.mk: update K nightly version' | ||
|
||
hub pull-request --push --force --head "$BRANCH_NAME" --base "$UPSTREAM_BRANCH" --reviewer ehildenb --file - <<MSG | ||
Update K Nightly version used for integration testing | ||
PR generated by '$0' | ||
MSG |
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -exuo pipefail | ||
|
||
export TOP=${TOP:-$(git rev-parse --show-toplevel)} | ||
|
||
new_nightly="$(curl 'https://api.github.com/repos/kframework/k/releases' | jq --raw-output '.[0].assets[].browser_download_url | match(".*nightly.tar.gz").string')" | ||
|
||
sed -i '/K_NIGHTLY_URL.*/c\'"K_NIGHTLY_URL = $new_nightly" "$TOP/include.mk" |