-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from stslex/dev
Refactor feature builder. Update ci - auto publish
- Loading branch information
Showing
21 changed files
with
226 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# Define the initial script directory | ||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
project_dir="$(dirname "$script_dir")" | ||
project_dir="$(dirname "$project_dir")" | ||
echo "Project script directory: $project_dir" | ||
|
||
# Define the path to the target file | ||
version_file="$project_dir/gradle/libs.versions.toml" | ||
|
||
# Check if the target file exists | ||
if [ -f "$version_file" ]; then | ||
echo "Target file found: $version_file" | ||
else | ||
echo "Target file not found" | ||
exit 1 # Exit the script if the target file is not found | ||
fi | ||
|
||
# Read versionName and versionCode from the file | ||
version_name=$(awk -F '"' '/versionName = "/{print $2}' "$version_file") | ||
version_code=$(awk -F '"' '/versionCode = "/{print $2}' "$version_file") | ||
|
||
# Increment versionCode by 1 | ||
((version_code++)) | ||
|
||
# Increment versionName by 0.01 | ||
version_name=$(echo "$version_name + 0.01" | bc) | ||
|
||
# Update the file with the new version information | ||
sed "s/versionName = \".*\"/versionName = \"$version_name\"/" "$version_file" > "$version_file.tmp" | ||
mv "$version_file.tmp" "$version_file" | ||
|
||
sed "s/versionCode = \".*\"/versionCode = \"$version_code\"/" "$version_file" > "$version_file.tmp" | ||
mv "$version_file.tmp" "$version_file" | ||
|
||
echo "Updated versionName to $version_name and versionCode to $version_code in $version_file" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
name: Android Deploy Beta | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -10,12 +12,15 @@ jobs: | |
timeout-minutes: 60 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- run: | | ||
echo "${{ secrets.KEYSTORE }}" > keystore.jks.asc | ||
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch keystore.jks.asc > keystore.jks | ||
- name: Update Version | ||
run: bash ./.github/scripts/update_versions.sh | ||
|
||
- uses: ruby/[email protected] | ||
with: | ||
ruby-version: '2.7.0' | ||
|
@@ -79,4 +84,16 @@ jobs: | |
base64 -d -i play_config.json.b64 > play_config.json | ||
- name: Distribute app to Beta track 🚀 | ||
run: bundle exec fastlane beta | ||
run: bundle exec fastlane beta | ||
|
||
- name: Commit files | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -a -m "update version" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.PUSH_TOKEN }} | ||
branch: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,15 @@ jobs: | |
timeout-minutes: 60 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- run: | | ||
echo "${{ secrets.KEYSTORE }}" > keystore.jks.asc | ||
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch keystore.jks.asc > keystore.jks | ||
- name: Update Version | ||
run: bash ./.github/scripts/update_versions.sh | ||
|
||
- uses: ruby/[email protected] | ||
with: | ||
ruby-version: '2.7.0' | ||
|
@@ -79,4 +82,16 @@ jobs: | |
base64 -d -i play_config.json.b64 > play_config.json | ||
- name: Distribute app to Beta track 🚀 | ||
run: bundle exec fastlane deploy | ||
run: bundle exec fastlane deploy | ||
|
||
- name: Commit files | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -a -m "update version" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.PUSH_TOKEN }} | ||
branch: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,28 @@ | ||
import org.gradle.api.Project | ||
import org.gradle.api.artifacts.VersionCatalog | ||
import org.gradle.api.artifacts.VersionCatalogsExtension | ||
import org.gradle.kotlin.dsl.getByType | ||
|
||
object AppVersions { | ||
const val VERSION_NAME = "1.71" | ||
const val VERSION_CODE = 17 | ||
} | ||
|
||
object AppExt { | ||
|
||
/** | ||
* Get the version catalog for the project | ||
* */ | ||
val Project.currentLibs: VersionCatalog | ||
get() = extensions.getByType<VersionCatalogsExtension>().named("libs") | ||
|
||
/** | ||
* Find the version of the library | ||
*/ | ||
fun VersionCatalog.findVersionInt(name: String) = findVersionString(name).toInt() | ||
|
||
/** | ||
* Find the version of the library | ||
*/ | ||
fun VersionCatalog.findVersionString(name: String) = findVersion(name).get().toString() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
core/ui/src/main/java/st/slex/csplashscreen/core/ui/di/MainUiProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
package st.slex.csplashscreen.core.ui.di | ||
|
||
import android.content.Context | ||
|
||
interface MainUiProvider { | ||
|
||
val api: MainUiApi | ||
} | ||
|
||
val Context.mainUiApi: MainUiApi | ||
get() = (this as MainUiProvider).api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.