-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 1uc/product-slices
- Loading branch information
Showing
142 changed files
with
8,740 additions
and
4,383 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,70 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Usage: | ||
# $0 PACKAGE_NAME VERSION | ||
# | ||
# Before calling this script, run the commands to update the dependency. If | ||
# there dependency shouldn't update then the script must not modify the repo. | ||
# | ||
# When the repo is in the updated state, run this script. It will commit | ||
# everything and create a PR. | ||
# | ||
# The PR title is `Update ${PACKAGE_NAME} to ${VERSION}` the script checks for | ||
# this string and only creates a new PR if the string isn't the title of an | ||
# existing PR. | ||
# | ||
# PACKAGE_NAME is an identifier of the package, no spaces. Doesn't need to be | ||
# the exact name of the dependency. | ||
# | ||
# VERSION an identifier of the next version of the package, no spaces. This | ||
# variable must be the same if the version if the same and different if | ||
# the version is different. However, it doesn't have to be a `x.y.z` it | ||
# could be a Git SHA, or something else. | ||
|
||
set -eu | ||
|
||
PACKAGE_NAME=$1 | ||
VERSION=$2 | ||
BRANCH=update-${PACKAGE_NAME}-${VERSION} | ||
COMMIT_MESSAGE="Update ${PACKAGE_NAME} to ${VERSION}" | ||
|
||
if [[ -z "${PACKAGE_NAME}" ]] | ||
then | ||
echo "Empty PACKAGE_NAME." | ||
exit -1 | ||
fi | ||
|
||
if [[ -z "${VERSION}" ]] | ||
then | ||
echo "Empty VERSION." | ||
exit -1 | ||
fi | ||
|
||
|
||
# NOTE: In a later runs of CI we will search for PR with this exact | ||
# title. Only if no such PR exists will the script create a | ||
# new PR. | ||
PR_TITLE="Update ${PACKAGE_NAME} to ${VERSION}" | ||
|
||
if [[ -z "$(git status --porcelain)" ]] | ||
then | ||
echo "No differences detected: ${PACKAGE_NAME} is up-to-date." | ||
exit 0 | ||
fi | ||
|
||
if [[ -z "$(gh pr list --state all --search "${PR_TITLE}")" ]] | ||
then | ||
|
||
git checkout -b $BRANCH | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git commit -a -m "${COMMIT_MESSAGE}" | ||
|
||
git push -u origin ${BRANCH} | ||
gh pr create \ | ||
--title "${PR_TITLE}" \ | ||
--body "This PR was generated by a Github Actions workflow." | ||
|
||
else | ||
echo "Old PR detected: didn't create a new one." | ||
fi |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -e | ||
set -eu | ||
|
||
if [[ $# -eq 0 ]] | ||
then | ||
|
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 |
---|---|---|
|
@@ -17,33 +17,4 @@ jobs: | |
run: | | ||
VERSION=$(doc/doxygen-awesome-css/update_doxygen_awesome.sh "$(mktemp -d)") | ||
BRANCH=update-doxygen-awesome-${VERSION} | ||
COMMIT_MESSAGE="Update doxygen-awesome to ${VERSION}" | ||
# NOTE: In a later runs of CI we will search for PR with this exact | ||
# title. Only if no such PR exists will the script create a | ||
# new PR. | ||
PR_TITLE="[docs] Update doxygen-awesome to ${VERSION}" | ||
if [[ -z "$(git status --porcelain)" ]] | ||
then | ||
echo "No differences detected: doxygen-awesome is up-to-date." | ||
exit 0 | ||
fi | ||
if [[ -z "$(gh pr list --state all --search "${PR_TITLE}")" ]] | ||
then | ||
git checkout -b $BRANCH | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git commit -a -m "${COMMIT_MESSAGE}" | ||
git push -u origin ${BRANCH} | ||
gh pr create \ | ||
--title "${PR_TITLE}" \ | ||
--body "This PR was generated by a Github Actions workflow." | ||
else | ||
echo "Old PR detected: didn't create a new one." | ||
fi | ||
.github/create_submodule_update_pr.sh doxygen-awesome ${VERSION} |
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
Oops, something went wrong.