Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release gears-kotlin and gears-compose v0.1.0 #62

Merged
merged 4 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)**

Expand Down
7 changes: 7 additions & 0 deletions gears/gears-compose/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
19 changes: 9 additions & 10 deletions gears/gears-compose/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# gears-compose <GitHub path="RedMadRobot/gears-android/tree/main/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]
Expand Down Expand Up @@ -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

Expand All @@ -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
7 changes: 7 additions & 0 deletions gears/gears-kotlin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
16 changes: 5 additions & 11 deletions gears/gears-kotlin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gears-kotlin <GitHub path="RedMadRobot/gears-android/tree/main/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.
Expand All @@ -21,20 +21,14 @@ Add the dependency:
```groovy
repositories {
mavenCentral()
google()
}

dependencies {
implementation("com.redmadrobot.gears:gears-kotlin:<version>")
}
```

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

Expand All @@ -49,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
25 changes: 16 additions & 9 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ function error() {
return 1
}

function skip() {
echo "👌 SKIPPED."
exit 0
}

function get_current_version() {
local version=""
if [[ -f $properties ]]; then
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down