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

misc: add releasing scripts #8387

Merged
merged 5 commits into from
Apr 25, 2019
Merged

misc: add releasing scripts #8387

merged 5 commits into from
Apr 25, 2019

Conversation

patrickhulce
Copy link
Collaborator

@patrickhulce patrickhulce commented Apr 18, 2019

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 :)

@patrickhulce patrickhulce marked this pull request as ready for review April 19, 2019 22:05
Copy link
Member

@paulirish paulirish left a 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.

docs/releasing.md Outdated Show resolved Hide resolved
lighthouse-core/scripts/publish-prepare-commit.sh Outdated Show resolved Hide resolved
lighthouse-core/scripts/publish-prepare-commit.sh Outdated Show resolved Hide resolved
NEEDLE="^ \"version\": \"$SEMVER_PATTERN\""
REPLACEMENT=" \"version\": \"$NEW_VERSION\""

sed -i '' "s/$NEEDLE/$REPLACEMENT/g" package.json clients/extension/manifest.json
Copy link
Member

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.

Copy link
Collaborator Author

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL comm ❤️

lighthouse-core/scripts/publish-prepare-pristine.sh Outdated Show resolved Hide resolved
docs/releasing.md Outdated Show resolved Hide resolved
docs/releasing.md Show resolved Hide resolved
yarn test

echo "Running the smoke tests...."
yarn smoke
Copy link
Member

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?

Copy link
Collaborator Author

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

@paulirish paulirish merged commit 49bef0e into master Apr 25, 2019
@paulirish paulirish deleted the prepublish_test_script branch April 25, 2019 17:17
Copy link
Member

@brendankenny brendankenny left a 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
Copy link
Member

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)
Copy link
Member

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"
Copy link
Member

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants