-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
misc: add releasing scripts #8387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks dope. nice stuff.
NEEDLE="^ \"version\": \"$SEMVER_PATTERN\"" | ||
REPLACEMENT=" \"version\": \"$NEW_VERSION\"" | ||
|
||
sed -i '' "s/$NEEDLE/$REPLACEMENT/g" package.json clients/extension/manifest.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice. handy that you can do both in the same cmd.
do we need an || exit 1
on the sed for failure states? dunno if it'd have one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we've got set -euxo pipefail
so any failing command should fail
or is that not what you're referring to?
# Add new contributors to changelog | ||
git --no-pager shortlog -s -e -n "v2.3.0..v${OLD_VERSION}" | cut -f 2 | sort > auto_contribs_prior_to_last | ||
git --no-pager shortlog -s -e -n "v${OLD_VERSION}..HEAD" | cut -f 2 | sort > auto_contribs_since_last | ||
NEW_CONTRIBUTORS=$(comm -13 auto_contribs_prior_to_last auto_contribs_since_last) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL comm
❤️
yarn test | ||
|
||
echo "Running the smoke tests...." | ||
yarn smoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dunno about @hoten but i usually run this stuff in another shell since it's so time-consuming.
not sure about a good solution for parallelizing, though.
https://stackoverflow.com/a/38109901/89484 perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah parallel shell business always makes me nervous... good candidate for a perf OYB testing PR? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's see how this goes :)
echo "It's been merged! 🎉" | ||
|
||
# Run the tests again :) | ||
bash ./lighthouse-core/scripts/release/release-test.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these don't match the actual script names :)
# Add new contributors to changelog | ||
git --no-pager shortlog -s -e -n "v2.3.0..v${OLD_VERSION}" | cut -f 2 | sort > auto_contribs_prior_to_last | ||
git --no-pager shortlog -s -e -n "v${OLD_VERSION}..HEAD" | cut -f 2 | sort > auto_contribs_since_last | ||
NEW_CONTRIBUTORS=$(comm -13 auto_contribs_prior_to_last auto_contribs_since_last) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is awesome
git --no-pager diff HEAD^ | ||
echo "${TXT_DIM}Press any key to push to GitHub, CTRL+C to exit...${TXT_RESET}" | ||
read -n 1 -r unused_variable | ||
git push -u origin "$BRANCH_NAME" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of committing or pushing on my behalf, but I haven't been doing the releasing recently, so...
Summary
Step 1 to writing a script to auto test our tarball without the test files bundled is writing a script to auto test our tarball with the test files :)