-
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.
- Loading branch information
1 parent
825a6b9
commit 94f6e93
Showing
2 changed files
with
34 additions
and
14 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 |
---|---|---|
|
@@ -8,12 +8,14 @@ on: | |
jobs: | ||
android-build: | ||
name: Android Build | ||
runs-on: macos-latest # using ubuntu latest version / or you can use a specific version | ||
# runs-on: ubuntu-latest # using ubuntu latest version / or you can use a specific version | ||
# runs-on: [self-hosted, macOS] # using ubuntu latest version / or you can use a specific version | ||
runs-on: ubuntu-latest # using ubuntu latest version / or you can use a specific version | ||
|
||
steps: | ||
- name: Check out Git repository # clone the repo to local ci workspace | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
|
@@ -70,6 +72,14 @@ jobs: | |
- name: Run Increment Script | ||
run: ./script.sh | ||
|
||
- name: Commit report | ||
run: | | ||
git config --global user.name 'test user' | ||
git config --global user.email '[email protected]' | ||
git commit -am "Increment android version to version 4.1.5" | ||
git --no-pager log --graph -10 --all --color --date=short --pretty=format:"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset" | ||
git push | ||
- name: Generate App APK | ||
run: | | ||
cd android && ./gradlew assembleRelease --no-daemon | ||
|
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,20 +1,19 @@ | ||
# need PlistBuddy installed | ||
appName=ActionApp | ||
appTestName="${appName}Tests" | ||
currentIOSPatchVersion=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" ios/$appName/info.plist) | ||
currentIOSVersion=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ios/$appName/info.plist) | ||
# currentIOSPatchVersion=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" ios/$appName/info.plist) | ||
# currentIOSVersion=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ios/$appName/info.plist) | ||
currentAndroidVersion=$(cat android/app/build.gradle | grep -m1 'versionName' | cut -d '"' -f2) | ||
currentVersionCode=$(cat android/app/build.gradle | grep -m1 'versionCode' | tr -s ' ' | cut -d ' ' -f3) | ||
|
||
currentIOSFullVersion="$currentIOSVersion.$currentIOSPatchVersion" | ||
currentIOSMajorVersion=${currentIOSVersion%.*} | ||
currentIOSMinorVersion=${currentIOSVersion##*.} | ||
# currentIOSFullVersion="$currentIOSVersion.$currentIOSPatchVersion" | ||
# currentIOSMajorVersion=${currentIOSVersion%.*} | ||
# currentIOSMinorVersion=${currentIOSVersion##*.} | ||
|
||
echo "current ios major version: $currentIOSMajorVersion" | ||
echo "current ios minor version: $currentIOSMinorVersion" | ||
echo "current ios patch version: $currentIOSPatchVersion" | ||
echo "current ios pbxproj patch version: $currentPbxProjPatchVersion" | ||
echo "current ios version: $currentIOSFullVersion" | ||
# echo "current ios major version: $currentIOSMajorVersion" | ||
# echo "current ios minor version: $currentIOSMinorVersion" | ||
# echo "current ios patch version: $currentIOSPatchVersion" | ||
# echo "current ios version: $currentIOSFullVersion" | ||
echo "current android version: $currentAndroidVersion" | ||
echo "current android version code: $currentVersionCode" | ||
|
||
|
@@ -87,12 +86,23 @@ increaseAndroidVersion() { | |
# } | ||
|
||
increaseAndroidVersion "4.1.5" | ||
|
||
updatedAndroidVersionCode=$(cat android/app/build.gradle | grep -m1 'versionCode' | tr -s ' ' | cut -d ' ' -f3) | ||
updatedAndroidVersion=$(cat android/app/build.gradle | grep -m1 'versionName' | cut -d '"' -f2) | ||
|
||
# git config --global user.email "[email protected]" | ||
# git config --global user.name "github action" | ||
# git add android/app/build.gradle | ||
# git commit -m "Increment android version to version ${updatedAndroidVersion}" | ||
# git --no-pager log --graph -10 --all --color --date=short --pretty=format:"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset" | ||
# updatedIOSPatchVersion=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" ios/$appName/info.plist) | ||
# updatedIOSVersion=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ios/$appName/info.plist) | ||
# updatedAndroidVersionCode=$(cat android/app/build.gradle | grep -m1 'versionCode' | tr -s ' ' | cut -d ' ' -f3) | ||
updatedAndroidVersionCode=$(cat android/app/build.gradle | grep -m1 'versionCode' | tr -s ' ' | cut -d ' ' -f3) | ||
updatedAndroidVersion=$(cat android/app/build.gradle | grep -m1 'versionName' | cut -d '"' -f2) | ||
# updatedIOSFullVersion="$updatedIOSVersion.$updatedIOSPatchVersion" | ||
# echo "updated ios version: $updatedIOSFullVersion" | ||
# echo "updated android version code: $updatedAndroidVersionCode" | ||
echo "updated android version code: $updatedAndroidVersionCode" | ||
echo "updated android version name: $updatedAndroidVersion" | ||
# getVersion() { | ||
# currentIOSFullVersion="$currentIOSVersion.$currentIOSPatchVersion" | ||
# echo "current ios version: $currentIOSFullVersion" | ||
|