This repository was archived by the owner on Oct 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +72
-8
lines changed
Expand file tree Collapse file tree 6 files changed +72
-8
lines changed Original file line number Diff line number Diff line change 9696 tag_name : ${{ env.VERSION }}
9797 env :
9898 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
99+
100+ - name : Update version in README and openiap-versions.json
101+ run : |
102+ # Use the update script
103+ chmod +x ./scripts/update-version.sh
104+ ./scripts/update-version.sh "$VERSION"
105+
106+ - name : Commit and push version updates
107+ run : |
108+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
109+ git config --local user.name "github-actions[bot]"
110+ git add README.md openiap-versions.json
111+ git diff --staged --quiet || git commit -m "chore: update version to $VERSION [skip ci]"
112+ git push origin HEAD:main
Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ Add to your module's `build.gradle.kts`:
4848
4949``` kotlin
5050dependencies {
51- implementation(" io.github.hyochan.openiap:openiap-google:1.2.6 " )
51+ implementation(" io.github.hyochan.openiap:openiap-google:1.2.7 " )
5252}
5353```
5454
5555Or ` build.gradle ` :
5656
5757``` groovy
5858dependencies {
59- implementation 'io.github.hyochan.openiap:openiap-google:1.2.6 '
59+ implementation 'io.github.hyochan.openiap:openiap-google:1.2.7 '
6060}
6161```
6262
Original file line number Diff line number Diff line change @@ -6,15 +6,13 @@ plugins {
66 id(" com.vanniktech.maven.publish" ) version " 0.29.0" apply false
77}
88
9- // openiap-versions.json에서 버전 읽기 (간단한 파싱)
109import java.io.File
1110
1211val versionsFile = File (rootDir, " openiap-versions.json" )
1312val jsonText = versionsFile.readText()
1413val googleVersion = jsonText.substringAfter(" \" google\" : \" " ).substringBefore(" \" " )
1514val gqlVersion = jsonText.substringAfter(" \" gql\" : \" " ).substringBefore(" \" " )
1615
17- // 버전을 프로젝트 속성으로 설정
1816extra[" OPENIAP_VERSION" ] = googleVersion
1917extra[" GQL_VERSION" ] = gqlVersion
2018
Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ kotlin.code.style=official
1515# thereby reducing the size of the R class for that library
1616android.nonTransitiveRClass =true
1717
18- # Version - 이제 openiap-versions.json에서 읽음 (아래 build.gradle 참조)
19- # OPENIAP_VERSION=1.2.5 // 이 줄 제거
20-
2118# Library Info
2219OPENIAP_GROUP_ID =io.github.hyochan.openiap
2320OPENIAP_ARTIFACT_ID =openiap-google
Original file line number Diff line number Diff line change 11{
22 "google" : " 1.2.7" ,
33 "gql" : " 1.0.9"
4- }
4+ }
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ # This script updates the version in README.md and openiap-versions.json
5+ # Usage: ./scripts/update-version.sh <version>
6+
7+ if [ $# -ne 1 ]; then
8+ echo " Usage: $0 <version>"
9+ echo " Example: $0 1.2.7"
10+ exit 1
11+ fi
12+
13+ VERSION=" $1 "
14+ # Trim leading 'v' if present
15+ VERSION=" ${VERSION# v} "
16+
17+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
18+ REPO_ROOT=" $( cd " ${SCRIPT_DIR} /.." && pwd) "
19+ README_FILE=" ${REPO_ROOT} /README.md"
20+ VERSIONS_FILE=" ${REPO_ROOT} /openiap-versions.json"
21+
22+ echo " Updating version to $VERSION "
23+
24+ # Update README.md
25+ if [[ " $OSTYPE " == " darwin" * ]]; then
26+ # macOS uses different sed syntax
27+ sed -i ' ' " s/openiap-google:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/openiap-google:$VERSION /g" " $README_FILE "
28+ else
29+ # Linux
30+ sed -i " s/openiap-google:[0-9]\+\.[0-9]\+\.[0-9]\+/openiap-google:$VERSION /g" " $README_FILE "
31+ fi
32+
33+ # Update openiap-versions.json (preserving gql version)
34+ if command -v python3 & > /dev/null; then
35+ GQL_VERSION=$( python3 -c " import json; print(json.load(open('$VERSIONS_FILE '))['gql'])" 2> /dev/null || echo " 1.0.9" )
36+ else
37+ GQL_VERSION=$( grep ' "gql"' " $VERSIONS_FILE " | sed ' s/.*"gql".*"\([^"]*\)".*/\1/' )
38+ fi
39+
40+ cat > " $VERSIONS_FILE " << EOF
41+ {
42+ "google": "$VERSION ",
43+ "gql": "$GQL_VERSION "
44+ }
45+ EOF
46+
47+ echo " ✅ Updated README.md and openiap-versions.json to version $VERSION "
48+ echo " "
49+ echo " Files modified:"
50+ echo " - $README_FILE "
51+ echo " - $VERSIONS_FILE "
52+ echo " "
53+ echo " To commit these changes:"
54+ echo " git add README.md openiap-versions.json"
55+ echo " git commit -m \" chore: update version to $VERSION \" "
You can’t perform that action at this time.
0 commit comments