From 2e265ed783a59314c333f645e29e93a0afe29b37 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 2 Aug 2024 11:13:05 +0200 Subject: [PATCH 1/4] ci: Allow to continue release flow for existing version --- release.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/release.sh b/release.sh index 23f9ee0..00adb3b 100755 --- a/release.sh +++ b/release.sh @@ -35,6 +35,11 @@ function error() { return 1 } +function skip() { + echo "👌 SKIPPED." + exit 0 +} + function get_current_version() { local version="" if [[ -f $properties ]]; then @@ -66,6 +71,12 @@ function replace() { function diff_link() { echo -n "$github_repository_url/compare/${1}...${2}" } + +function wait_confirmation() { + local input + read -p " Enter 'yes' to continue: " -r input + [[ $input == "yes" ]] +} #endregion # Check if the module exists @@ -74,8 +85,8 @@ function diff_link() { # 0. Fetch remote changes echo "️⏳ Creating release branch..." release_branch="release/$release" -git checkout --quiet -b "$release_branch" -git pull --quiet --rebase origin main +git checkout --quiet -B "$release_branch" +git pull --quiet --rebase origin main || wait_confirmation || skip echo "✅ Branch '$release_branch' created" echo @@ -84,7 +95,7 @@ last_version=$(get_current_version) version=${release##*-v} # library-v1.0.0 -> 1.0.0 if [[ "$last_version" == "$version" ]]; then echo "🤔 Version $version is already set." - exit 0 + wait_confirmation || skip fi echo "🚀 [$module] Update $last_version → $version" echo @@ -112,16 +123,12 @@ echo "✅ Updated CHANGELOG.md header" echo echo "Do you want to commit the changes and push the release branch and tag?" echo "The release tag push triggers a release workflow on CI." -read -p " Enter 'yes' to continue: " -r input -if [[ "$input" != "yes" ]]; then - echo "👌 SKIPPED." - exit 0 -fi +wait_confirmation || skip # 5. Push changes, trigger release on CI, and give a link to open PR echo echo "⏳ Pushing the changes to the remote repository..." -git add "$readme" "$changelog" "$properties" "$build_script" +git add "$module_path" git commit --quiet --message "$library: $version" git tag "$release" git push --quiet origin HEAD "$release" From d74ff1dbf3f65da36a1ad37ce94608ab574223bb Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 2 Aug 2024 11:50:55 +0200 Subject: [PATCH 2/4] gears-kotlin: 0.1.0 --- README.md | 2 +- gears/gears-kotlin/CHANGELOG.md | 7 +++++++ gears/gears-kotlin/README.md | 8 +------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1bcce45..25cf4dc 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Gears could be used together or alone. ### :gear: **[Gears](gears/)** - [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/gears-compose?style=flat-square&label=gears-compose)][gears-compose] — A set of gears for Jetpack Compose -- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/kotlin?style=flat-square&label=gears-kotlin)][gears-kotlin] — A set of gears for Kotlin +- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/gears-kotlin?style=flat-square&label=gears-kotlin)][gears-kotlin] — A set of gears for Kotlin ### :hammer_and_wrench: **[red_mad_robot Android KTX](ktx/)** diff --git a/gears/gears-kotlin/CHANGELOG.md b/gears/gears-kotlin/CHANGELOG.md index 6ef2c80..70a7439 100644 --- a/gears/gears-kotlin/CHANGELOG.md +++ b/gears/gears-kotlin/CHANGELOG.md @@ -1,6 +1,13 @@ ## Unreleased +- *No changes* + +## [0.1.0] (2024-08-01) + ### Added - `T.applyIf` - Applies the given block of modifications to the T if the condition is true - `T.applyIfNotNull` - Applies the given block of modifications to the T if the value is not null + + +[0.1.0]: https://github.com/RedMadRobot/gears-android/compare/55223709...daf5c330 diff --git a/gears/gears-kotlin/README.md b/gears/gears-kotlin/README.md index 075e7e1..5216289 100644 --- a/gears/gears-kotlin/README.md +++ b/gears/gears-kotlin/README.md @@ -21,7 +21,6 @@ Add the dependency: ```groovy repositories { mavenCentral() - google() } dependencies { @@ -29,12 +28,7 @@ dependencies { } ``` -The library was developed and tested using: - -> - `kotlin` [1.9.23](https://github.com/JetBrains/kotlin/releases/tag/v1.9.23) - -> [!NOTE] -> These dependencies will be transiently included in your project. +The library was developed and tested with Kotlin [2.0.0](https://github.com/JetBrains/kotlin/releases/tag/v2.0.0) ## Usage From 7cb7bbfa8f8fcf630b0791fc46de41bfef122826 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 2 Aug 2024 12:01:41 +0200 Subject: [PATCH 3/4] gears-kotlin: Fix links in README --- gears/gears-kotlin/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gears/gears-kotlin/README.md b/gears/gears-kotlin/README.md index 5216289..5838c4e 100644 --- a/gears/gears-kotlin/README.md +++ b/gears/gears-kotlin/README.md @@ -1,6 +1,6 @@ -# gears-kotlin +# gears-kotlin -[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/kotlin?style=flat-square)][mavenCentral] +[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/gears-kotlin?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] A set of gears for Kotlin. @@ -43,5 +43,5 @@ Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. -[mavenCentral]: https://search.maven.org/artifact/com.redmadrobot.gears/gears-kotlin -[license]: ../LICENSE +[mavenCentral]: https://central.sonatype.com/artifact/com.redmadrobot.gears/gears-kotlin +[license]: ../../LICENSE From 90754335ae2733e70b69d312a06c2498a4261da2 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 2 Aug 2024 12:04:16 +0200 Subject: [PATCH 4/4] gears-compose: 0.1.0 --- gears/gears-compose/CHANGELOG.md | 7 +++++++ gears/gears-compose/README.md | 19 +++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/gears/gears-compose/CHANGELOG.md b/gears/gears-compose/CHANGELOG.md index 80889f1..f6f1bd5 100644 --- a/gears/gears-compose/CHANGELOG.md +++ b/gears/gears-compose/CHANGELOG.md @@ -1,5 +1,12 @@ ## Unreleased +- *No changes* + +## [0.1.0] (2024-08-02) + ### Added - `FixedFontScaleContainer` - A container that fixes the font scale, ignoring values that are set in the phone's system settings + + +[0.1.0]: https://github.com/RedMadRobot/gears-android/compare/9d632943...e67924a7 diff --git a/gears/gears-compose/README.md b/gears/gears-compose/README.md index 1afb7d0..d0c31c1 100644 --- a/gears/gears-compose/README.md +++ b/gears/gears-compose/README.md @@ -1,4 +1,4 @@ -# gears-compose +# gears-compose [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/gears-compose?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] @@ -29,14 +29,13 @@ dependencies { } ``` - -The library was developed and tested using: - -> - `compose-runtime` [1.6.5](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.6.5) -> - `compose-ui` [1.6.5](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.5) - > [!NOTE] -> These dependencies will be transiently included in your project. +> +> Dependencies: +> - `compose-ui` [1.6.8](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.8) +> - `compose-runtime` [1.6.8](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.6.8) +> +> These dependencies will be transitively added to your project. ## Usage @@ -50,5 +49,5 @@ Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. -[mavenCentral]: https://search.maven.org/artifact/com.redmadrobot.gears/compose -[license]: ../LICENSE +[mavenCentral]: https://central.sonatype.com/artifact/com.redmadrobot.gears/gears-compose +[license]: ../../LICENSE