Skip to content

Commit 16ab8de

Browse files
committed
preparing new release v1.7.5
Change-Id: Ic14d7b34031a384de3cc8f5c604dad48876246cf Signed-off-by: AbdAlMoniem AlHifnawy <hifnawy_moniem@hotmail.com>
1 parent 2eb77ea commit 16ab8de

File tree

5 files changed

+80
-3
lines changed

5 files changed

+80
-3
lines changed

.github/workflows/publish_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
required: true
1010
type: choice
1111
options:
12+
- v1.7.5
1213
- v1.7.2
1314
- v1.7.1
1415
- v1.7.0

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ android {
1515
applicationId = "com.hifnawy.caffeinate"
1616
minSdk = 24
1717
targetSdk = 35
18-
versionCode = 28
19-
versionName = "1.7.2"
18+
versionCode = 29
19+
versionName = "1.7.5"
2020

2121
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2222
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
* added themed icons support
3+
* fixed theme choice dialog on small devices
4+
* New translations strings.xml (Arabic)
5+
* New translations strings.xml (Arabic, Egypt)
6+
* Update issue templates
7+
- preparing new release v1.7.5
8+
- app icons is now themed with adaptive icons, which will be enabled if the user enables adaptive icon coloring from the launcher/OS settings
9+
- removed duplicate and unnecessary screenshots in fastlane
10+
- fixed theme choice dialog clipping dialog buttons on small dpi scaled devices
11+
- New Crowdin updates (#50)
12+
- refix quick tile not updating on some devices

git_hooks/get_changelog.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
3+
# Get the latest tag
4+
gitTopLevel="$(git rev-parse --show-toplevel)"
5+
versionCodeFilter="\(versionCode\s\+=\s\+\)\([[:digit:]]\+\)"
6+
previousTag=$(git tag | sort -V | tail -n 2 | head -n 1)
7+
latestTag=$(git describe --tags $(git rev-list --tags --max-count=1))
8+
versionCode=$(git show "$tag:app/build.gradle.kts" | grep versionCode | sed -e "s/$versionCodeFilter/\2/" | xargs)
9+
changeLogs=0
10+
subjects=()
11+
bodies=()
12+
13+
echo "Latest Tag: $latestTag, versionCode: $versionCode"
14+
15+
if [ -z "$latestTag" ] || [ -z "$previousTag" ]; then
16+
echo "No tags found in the repository."
17+
exit 1
18+
fi
19+
20+
echo "Generating Changelog..."
21+
while IFS= read -r body && IFS= read -r subject; do
22+
subject_trimmed=$(echo "$subject" | sed -e 's/Change-Id:\s*.*//' | sed -e 's/Signed-off-by:\s*.*//' | sed 's/__END__//' | sed -e 's/^[^a-zA-Z0-9]*//')
23+
body_trimmed=$(echo "$body" | sed -e 's/Change-Id:\s*.*//' | sed -e 's/Signed-off-by:\s*.*//' | sed 's/__END__//' | sed -e 's/^[^a-zA-Z0-9]*//')
24+
25+
[[ -n "$subject_trimmed" ]] && echo "* $subject_trimmed"
26+
[[ -n "$body_trimmed" ]] && echo "- $body_trimmed"
27+
28+
subjects+=("$subject_trimmed")
29+
bodies+=("$body_trimmed")
30+
done < <(git log "$previousTag".."$latestTag" --pretty=format:"%s%n%b%n__END__")
31+
32+
changeLogs=${#subjects[@]}
33+
34+
if [ $changeLogs -gt 0 ]; then
35+
echo "saving to '$gitTopLevel/fastlane/metadata/android/en-US/changeLogs/$versionCode.txt'..."
36+
37+
echo "" > "$gitTopLevel/fastlane/metadata/android/en-US/changeLogs/$versionCode.txt"
38+
39+
for subject in "${subjects[@]}"; do
40+
[[ -n "$subject" ]] && echo "* $subject" >> "$gitTopLevel/fastlane/metadata/android/en-US/changeLogs/$versionCode.txt"
41+
done
42+
43+
for body in "${bodies[@]}"; do
44+
[[ -n "$body" ]] && echo "- $body" >> "$gitTopLevel/fastlane/metadata/android/en-US/changeLogs/$versionCode.txt"
45+
done
46+
47+
currentCommitHash=$(git rev-parse HEAD)
48+
isCurrentCommitOnRemote=$(git branch -r --contains "$currentCommitHash")
49+
if [ -n "$isCurrentCommitOnRemote" ]; then
50+
newVersionName="${newTag#v}"
51+
52+
echo "commit '$currentCommitHash' is on the remote branch, creating a new change log commit..."
53+
echo
54+
55+
git add "$gitTopLevel/fastlane/metadata/android/en-US/changeLogs/"
56+
git commit -sm "updated $changeLogs change logs(s)"
57+
else
58+
echo "commit '$currentCommitHash' is not on the remote branch, amending..."
59+
echo
60+
61+
git add "$gitTopLevel/fastlane/metadata/android/en-US/changeLogs/"
62+
git commit --amend --no-edit
63+
fi
64+
fi

git_hooks/post_tag.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ update_publish_release_yaml_file_and_add_tag() {
7676
fi
7777

7878
scriptDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd -P)
79-
sh $scriptDir/update_fastlane_changelogs.sh
79+
sh $scriptDir/get_changelog.sh
8080

8181
else
8282
echo "ERROR: file $publishReleaseYaml not found"

0 commit comments

Comments
 (0)