mirror of
https://github.com/SchildiChat/schildichat-desktop.git
synced 2025-03-27 02:21:59 +01:00
Don't rely on upstream/master
This commit is contained in:
parent
31c746c5d2
commit
24803095bb
@ -85,9 +85,10 @@ check_clean_git() {
|
|||||||
|
|
||||||
revert_i18n_changes() {
|
revert_i18n_changes() {
|
||||||
local i18n_path="$1"
|
local i18n_path="$1"
|
||||||
local skip_commit="$2"
|
local revision="$2"
|
||||||
|
local skip_commit="$3"
|
||||||
|
|
||||||
git checkout upstream/master -- "$i18n_path"
|
git checkout "$revision" -- "$i18n_path"
|
||||||
|
|
||||||
if [[ "$skip_commit" != [Yy]* ]]; then
|
if [[ "$skip_commit" != [Yy]* ]]; then
|
||||||
git commit -m "Automatic i18n reversion" || true
|
git commit -m "Automatic i18n reversion" || true
|
||||||
@ -104,16 +105,23 @@ apply_i18n_changes() {
|
|||||||
automatic_i18n_reversion() {
|
automatic_i18n_reversion() {
|
||||||
local skip_commit="$1"
|
local skip_commit="$1"
|
||||||
|
|
||||||
|
local current_upstream_tag
|
||||||
|
get_current_upstream_tag
|
||||||
|
|
||||||
|
local current_mxjssdk_tag
|
||||||
|
local current_mxreactsdk_tag
|
||||||
|
get_current_mxsdk_tags
|
||||||
|
|
||||||
pushd "$SCHILDI_ROOT/matrix-react-sdk" > /dev/null
|
pushd "$SCHILDI_ROOT/matrix-react-sdk" > /dev/null
|
||||||
revert_i18n_changes "$i18n_path" "$skip_commit"
|
revert_i18n_changes "$i18n_path" "$current_mxreactsdk_tag" "$skip_commit"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
pushd "$SCHILDI_ROOT/element-web" > /dev/null
|
pushd "$SCHILDI_ROOT/element-web" > /dev/null
|
||||||
revert_i18n_changes "$i18n_path" "$skip_commit"
|
revert_i18n_changes "$i18n_path" "$current_upstream_tag" "$skip_commit"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
pushd "$SCHILDI_ROOT/element-desktop" > /dev/null
|
pushd "$SCHILDI_ROOT/element-desktop" > /dev/null
|
||||||
revert_i18n_changes "$i18n_path" "$skip_commit"
|
revert_i18n_changes "$i18n_path" "$current_upstream_tag" "$skip_commit"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,9 +204,10 @@ bump_release_version() {
|
|||||||
|
|
||||||
revert_packagejson_changes() {
|
revert_packagejson_changes() {
|
||||||
local path="$1"
|
local path="$1"
|
||||||
local skip_commit="$2"
|
local revision="$2"
|
||||||
|
local skip_commit="$3"
|
||||||
|
|
||||||
git checkout upstream/master -- "$path"
|
git checkout "$revision" -- "$path"
|
||||||
|
|
||||||
if [[ "$skip_commit" != [Yy]* ]]; then
|
if [[ "$skip_commit" != [Yy]* ]]; then
|
||||||
git commit -m "Automatic package.json reversion" || true
|
git commit -m "Automatic package.json reversion" || true
|
||||||
@ -220,7 +229,10 @@ apply_packagejson_overlay() {
|
|||||||
automatic_packagejson_reversion() {
|
automatic_packagejson_reversion() {
|
||||||
local skip_commit="$1"
|
local skip_commit="$1"
|
||||||
|
|
||||||
forelement_repos revert_packagejson_changes "package.json" "$skip_commit"
|
local current_upstream_tag
|
||||||
|
get_current_upstream_tag
|
||||||
|
|
||||||
|
forelement_repos revert_packagejson_changes "package.json" "$current_upstream_tag" "$skip_commit"
|
||||||
}
|
}
|
||||||
|
|
||||||
automatic_packagejson_adjustment() {
|
automatic_packagejson_adjustment() {
|
||||||
@ -233,3 +245,21 @@ automatic_packagejson_adjustment() {
|
|||||||
forelement_repos apply_packagejson_overlay "package.json" "overlay-package.json"
|
forelement_repos apply_packagejson_overlay "package.json" "overlay-package.json"
|
||||||
forelement_repos write_version "package.json"
|
forelement_repos write_version "package.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_latest_upstream_tag() {
|
||||||
|
pushd "$SCHILDI_ROOT/element-web" > /dev/null
|
||||||
|
git fetch upstream
|
||||||
|
latest_upstream_tag=`git for-each-ref --sort=creatordate --format '%(refname) %(creatordate)' refs/tags | sed -nr 's|refs/tags/(v[0-9]+(\.[0-9]+(\.[0-9]+)?)?) .*|\1|p' | tail -n 1`
|
||||||
|
popd > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
get_current_upstream_tag() {
|
||||||
|
local versions
|
||||||
|
get_current_versions
|
||||||
|
current_upstream_tag="v${versions[0]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_current_mxsdk_tags() {
|
||||||
|
current_mxreactsdk_tag="v$(cat "$SCHILDI_ROOT/element-web/package.json" | jq '.dependencies["matrix-react-sdk"]' -r)"
|
||||||
|
current_mxjssdk_tag="v$(cat "$SCHILDI_ROOT/element-web/package.json" | jq '.dependencies["matrix-js-sdk"]' -r)"
|
||||||
|
}
|
||||||
|
@ -23,7 +23,18 @@ automatic_i18n_reversion
|
|||||||
automatic_packagejson_reversion
|
automatic_packagejson_reversion
|
||||||
|
|
||||||
# Merge upstream
|
# Merge upstream
|
||||||
forall_repos git merge upstream/master
|
get_latest_upstream_tag
|
||||||
|
forelement_repos git merge "$latest_upstream_tag"
|
||||||
|
|
||||||
|
get_current_mxsdk_tags
|
||||||
|
|
||||||
|
pushd "matrix-js-sdk" > /dev/null
|
||||||
|
git merge "$current_mxjssdk_tag"
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
|
pushd "matrix-react-sdk" > /dev/null
|
||||||
|
git merge "$current_mxreactsdk_tag"
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
# Refresh environment
|
# Refresh environment
|
||||||
make clean
|
make clean
|
||||||
|
@ -9,8 +9,7 @@ pushd "$mydir" > /dev/null
|
|||||||
|
|
||||||
source ./merge_helpers.sh
|
source ./merge_helpers.sh
|
||||||
|
|
||||||
# Fetch to get latest strings for current version
|
# Fetch to get upstream strings for current version
|
||||||
# ToDo: Find out actual versions in case it's not yet merged
|
|
||||||
forall_repos git fetch upstream
|
forall_repos git fetch upstream
|
||||||
|
|
||||||
# Check branch
|
# Check branch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user