mirror of
https://github.com/SchildiChat/schildichat-desktop.git
synced 2025-03-31 21:24:27 +02:00
Re-enable auto-commit for icons and theme
This commit is contained in:
parent
ebc3498510
commit
4c8f9de4e8
@ -4,22 +4,37 @@ set -e
|
|||||||
|
|
||||||
mydir="$(dirname "$(realpath "$0")")"
|
mydir="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
|
print_section() {
|
||||||
|
local msg="$1"
|
||||||
|
echo "##############################################################"
|
||||||
|
echo "# $msg"
|
||||||
|
echo "##############################################################"
|
||||||
|
}
|
||||||
|
|
||||||
pushd "$mydir" > /dev/null
|
pushd "$mydir" > /dev/null
|
||||||
|
|
||||||
source ./merge_helpers.sh
|
source ./merge_helpers.sh
|
||||||
|
|
||||||
# Apply our patches
|
# Apply our patches
|
||||||
|
print_section "Apply patches to matrix-js-sdk"
|
||||||
apply_patches matrix-js-sdk
|
apply_patches matrix-js-sdk
|
||||||
|
print_section "Apply patches to matrix-react-sdk"
|
||||||
apply_patches matrix-react-sdk
|
apply_patches matrix-react-sdk
|
||||||
|
#print_section "Apply patches to element-web"
|
||||||
#apply_patches element-web
|
#apply_patches element-web
|
||||||
|
print_section "Apply patches to element-desktop"
|
||||||
apply_patches element-desktop
|
apply_patches element-desktop
|
||||||
|
|
||||||
# Automatic adjustments
|
# Automatic adjustments
|
||||||
|
#print_section "Apply i18n"
|
||||||
#automatic_i18n_adjustment
|
#automatic_i18n_adjustment
|
||||||
|
print_section "Apply automatic package adjustments"
|
||||||
automatic_packagejson_adjustment
|
automatic_packagejson_adjustment
|
||||||
|
|
||||||
# Automatic theme and icon update
|
# Automatic theme and icon update
|
||||||
|
print_section "Apply automatic theme updates"
|
||||||
./theme.sh y
|
./theme.sh y
|
||||||
./graphics/icon_gen.sh
|
print_section "Generate icons"
|
||||||
|
./graphics/icon_gen.sh y
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
mydir="$(dirname "$(realpath "$0")")"
|
mydir="$(dirname "$(realpath "$0")")"
|
||||||
|
automatic_commit="$1"
|
||||||
|
|
||||||
|
SCHILDI_ROOT="$mydir/.."
|
||||||
|
source "$SCHILDI_ROOT/merge_helpers.sh"
|
||||||
|
|
||||||
|
if [[ "$automatic_commit" == [Yy]* ]]; then
|
||||||
|
forelement_repos check_clean_git
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
export_rect() {
|
export_rect() {
|
||||||
@ -17,7 +27,7 @@ export_square() {
|
|||||||
export_rect "$1" "$size" "$in" "$out"
|
export_rect "$1" "$size" "$in" "$out"
|
||||||
}
|
}
|
||||||
|
|
||||||
repo_dir="$mydir/../element-web"
|
repo_dir="$SCHILDI_ROOT/element-web"
|
||||||
base_out="$repo_dir/res/vector-icons"
|
base_out="$repo_dir/res/vector-icons"
|
||||||
|
|
||||||
for i in 1024 120 150 152 180 24 300 44 48 50 76 88; do
|
for i in 1024 120 150 152 180 24 300 44 48 50 76 88; do
|
||||||
@ -45,7 +55,7 @@ for f in "$base_out"/*.png; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
repo_dir="$mydir/../element-desktop"
|
repo_dir="$SCHILDI_ROOT/element-desktop"
|
||||||
base_out="$repo_dir/res/img"
|
base_out="$repo_dir/res/img"
|
||||||
|
|
||||||
export_square 256 "$mydir/ic_launcher_sc.svg" "$base_out/element.png"
|
export_square 256 "$mydir/ic_launcher_sc.svg" "$base_out/element.png"
|
||||||
@ -77,3 +87,8 @@ rm "$base_out/icons/1024x1024.png"
|
|||||||
for f in "$base_out/icons"/*.png; do
|
for f in "$base_out/icons"/*.png; do
|
||||||
pngcrush -ow "$f"
|
pngcrush -ow "$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$automatic_commit" == [Yy]* ]]; then
|
||||||
|
forelement_repos commit_if_dirty "Automatic icon update"
|
||||||
|
fi
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SCHILDI_ROOT="$(dirname "$(realpath "$0")")"
|
if [ -z "$SCHILDI_ROOT" ]; then
|
||||||
|
SCHILDI_ROOT="$(dirname "$(realpath "$0")")"
|
||||||
|
fi
|
||||||
|
|
||||||
branch=${BRANCH:-"lite"}
|
branch=${BRANCH:-"lite"}
|
||||||
|
|
||||||
@ -290,3 +292,10 @@ on_apply_patch_fail() {
|
|||||||
echo "----------------------------------"
|
echo "----------------------------------"
|
||||||
read -p "Press enter after committing resolved conflicts: "
|
read -p "Press enter after committing resolved conflicts: "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
commit_if_dirty() {
|
||||||
|
local message="$1"
|
||||||
|
# see: https://devops.stackexchange.com/a/5443
|
||||||
|
git add -A
|
||||||
|
git diff-index --quiet HEAD || git commit -m "$message"
|
||||||
|
}
|
||||||
|
@ -52,6 +52,7 @@ popd > /dev/null
|
|||||||
# Refresh environment
|
# Refresh environment
|
||||||
make clean
|
make clean
|
||||||
make setup
|
make setup
|
||||||
|
forall_repos commit_if_dirty "Automatic setup commit"
|
||||||
|
|
||||||
./apply_patches.sh
|
./apply_patches.sh
|
||||||
|
|
||||||
|
12
theme.sh
12
theme.sh
@ -172,10 +172,10 @@ for f in res/**/*.svg; do
|
|||||||
replace_colors "$f"
|
replace_colors "$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
popd > /dev/null
|
if [[ "$automatic_commit" == [Yy]* ]]; then
|
||||||
|
# see: https://devops.stackexchange.com/a/5443
|
||||||
|
git add -A
|
||||||
|
git diff-index --quiet HEAD || git commit -m "Automatic theme update"
|
||||||
|
fi
|
||||||
|
|
||||||
#if [[ "$automatic_commit" == [Yy]* ]]; then
|
popd > /dev/null
|
||||||
# # see: https://devops.stackexchange.com/a/5443
|
|
||||||
# git add -A
|
|
||||||
# git diff-index --quiet HEAD || git commit -m "Automatic theme update"
|
|
||||||
#fi
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user