Add pre_merge.sh merge helper

Change-Id: Ic1cbd5f124a6a56dd7cd384b5177f739f5085f73
This commit is contained in:
SpiritCroc 2020-09-08 18:14:39 +02:00
parent 65716c0ee8
commit cd7fb3e164
2 changed files with 71 additions and 0 deletions

39
pre_merge.sh Executable file
View file

@ -0,0 +1,39 @@
#!/bin/bash
set -e
# Require clean git state
uncommitted=`git status --porcelain`
if [ ! -z "$uncommitted" ]; then
echo "Uncommitted changes are present, please commit first!"
exit 1
fi
find_last_commit_for_title() {
local title="$1"
git log --oneline --author=SpiritCroc | grep "$title" | head -n 1 | sed 's| .*||'
}
revert_last() {
local title="$1"
git revert --no-edit `find_last_commit_for_title "$title"`
}
restore_upstream() {
local f="$(basename "$1")"
local path="$(dirname "$1")"
local sc_f="tmp_sc_$f"
local upstream_f="upstream_$f"
mv "$path/$f" "$path/$sc_f"
if [ -e "$path/$upstream_f" ]; then
mv "$path/$upstream_f" "$path/$f"
fi
}
revert_last 'Resolve required manual intervention in german strings'
revert_last 'Automatic SchildiChat string correction'
restore_upstream fastlane
restore_upstream README.md
git add -A
git commit -m "[TMP] Automatic upstream merge preparation"

32
upstream_README.md Normal file
View file

@ -0,0 +1,32 @@
[![Buildkite](https://badge.buildkite.com/657d3db27364448d69d54f66c690f7788bc6aa80a7628e37f3.svg?branch=develop)](https://buildkite.com/matrix-dot-org/riotx-android/builds?branch=develop)
[![Weblate](https://translate.riot.im/widgets/element-android/-/svg-badge.svg)](https://translate.riot.im/engage/element-android/?utm_source=widget)
[![Element Android Matrix room #element-android:matrix.org](https://img.shields.io/matrix/element-android:matrix.org.svg?label=%23element-android:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#element-android:matrix.org)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=alert_status)](https://sonarcloud.io/dashboard?id=vector.android.riotx)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=vector.android.riotx)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=bugs)](https://sonarcloud.io/dashboard?id=vector.android.riotx)
# Element Android
Element Android is an Android Matrix Client provided by [Element](https://element.io/).
It is a total rewrite of [Riot-Android](https://github.com/vector-im/riot-android) with a new user experience.
[<img src="resources/img/google-play-badge.png" alt="Get it on Google Play" height="60">](https://play.google.com/store/apps/details?id=im.vector.app)
[<img src="resources/img/f-droid-badge.png" alt="Get it on F-Droid" height="60">](https://f-droid.org/app/im.vector.app)
Nightly build: [![Buildkite](https://badge.buildkite.com/657d3db27364448d69d54f66c690f7788bc6aa80a7628e37f3.svg?branch=develop)](https://buildkite.com/matrix-dot-org/riotx-android/builds?branch=develop)
# New Android SDK
Element is based on a new Android SDK fully written in Kotlin (like Element). In order to make the early development as fast as possible, Element and the new SDK currently share the same git repository. We will make separate repos once the SDK is stable enough.
# Roadmap
The version 1.0.0 of Element still misses some features which was previously included in Riot-Android.
The team will work to add them on a regular basis.
## Contributing
Please refer to [CONTRIBUTING.md](https://github.com/vector-im/riotX-android/blob/develop/CONTRIBUTING.md) if you want to contribute on Matrix Android projects!
Come chat with the community in the dedicated Matrix [room](https://matrix.to/#/#element-android:matrix.org).