Tweak branch matching to allow not applying outside of PRs for matrix-analytics-events (#11186)

This commit is contained in:
Michael Telatynski 2023-07-04 17:14:29 +01:00 committed by GitHub
parent cf11b5f400
commit 1a2d201863
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 21 deletions

View file

@ -9,20 +9,24 @@
set -ex set -ex
scripts/fetchdep.sh matrix-org matrix-js-sdk scripts/fetchdep.sh matrix-org matrix-js-sdk develop
pushd matrix-js-sdk pushd matrix-js-sdk
[ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF [ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF
yarn link yarn link
yarn install --frozen-lockfile $@ yarn install --frozen-lockfile $@
popd popd
scripts/fetchdep.sh matrix-org matrix-analytics-events main scripts/fetchdep.sh matrix-org matrix-analytics-events
pushd matrix-analytics-events # We don't pass a default branch so cloning may fail when we are not in a PR
yarn link # This is expected as this project does not share a release cycle but we still branch match it
yarn install --frozen-lockfile $@ if [ -d matrix-analytics-events ]; then
yarn build:ts pushd matrix-analytics-events
popd yarn link
yarn install --frozen-lockfile $@
yarn build:ts
popd
fi
yarn link matrix-js-sdk yarn link matrix-js-sdk
yarn link @matrix-org/analytics-events [ -d matrix-analytics-events ] && yarn link @matrix-org/analytics-events
yarn install --frozen-lockfile $@ yarn install --frozen-lockfile $@

View file

@ -14,30 +14,33 @@ set -ex
# for the primary repo (react-sdk in this case). # for the primary repo (react-sdk in this case).
# Set up the js-sdk first # Set up the js-sdk first
scripts/fetchdep.sh matrix-org matrix-js-sdk scripts/fetchdep.sh matrix-org matrix-js-sdk develop
pushd matrix-js-sdk pushd matrix-js-sdk
[ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF [ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF
yarn link yarn link
yarn install --frozen-lockfile yarn install --frozen-lockfile
popd popd
# Also set up matrix-analytics-events so we get the latest from # Also set up matrix-analytics-events for branch with matching name
# the main branch or a branch with matching name scripts/fetchdep.sh matrix-org matrix-analytics-events
scripts/fetchdep.sh matrix-org matrix-analytics-events main # We don't pass a default branch so cloning may fail when we are not in a PR
pushd matrix-analytics-events # This is expected as this project does not share a release cycle but we still branch match it
yarn link if [ -d matrix-analytics-events ]; then
yarn install --frozen-lockfile pushd matrix-analytics-events
yarn build:ts yarn link
popd yarn install --frozen-lockfile
yarn build:ts
popd
fi
# Now set up the react-sdk # Now set up the react-sdk
yarn link matrix-js-sdk yarn link matrix-js-sdk
yarn link @matrix-org/analytics-events [ -d matrix-analytics-events ] && yarn link @matrix-org/analytics-events
yarn link yarn link
yarn install --frozen-lockfile yarn install --frozen-lockfile
# Finally, set up element-web # Finally, set up element-web
scripts/fetchdep.sh vector-im element-web scripts/fetchdep.sh vector-im element-web develop
pushd element-web pushd element-web
yarn link matrix-js-sdk yarn link matrix-js-sdk
yarn link matrix-react-sdk yarn link matrix-react-sdk

View file

@ -6,8 +6,6 @@ deforg="$1"
defrepo="$2" defrepo="$2"
defbranch="$3" defbranch="$3"
[ -z "$defbranch" ] && defbranch="develop"
rm -r "$defrepo" || true rm -r "$defrepo" || true
# figure out where to look for pull requests: # figure out where to look for pull requests: