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

Fix commit of Google Play track edit being omitted #50

Merged
merged 1 commit into from
Apr 16, 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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal interface TrackManager {

data class BaseConfig(
val releaseStatus: ReleaseStatus? = null,
val userFraction: Double?,
val userFraction: Double? = null,
val updatePriority: Int?,
val releaseNotes: Map<String, String?>? = emptyMap(),
val retainableArtifacts: List<Long>? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract class PlayUploadWork : WorkAction<PlayUploadParameters> {
publisher = createPublisher(parameters.apiToken.asFile.get().inputStream()),
appId = parameters.appId.get(),
)
logger.info("Step 1/3: Requesting track edit...")
logger.info("Step 1/4: Requesting track edit...")
val editId =
when (val result = publisher.insertEdit()) {
is EditResponse.Success -> result.id
Expand All @@ -59,7 +59,7 @@ abstract class PlayUploadWork : WorkAction<PlayUploadParameters> {
val trackManager = DefaultTrackManager(publisher, editId)
val editManager = DefaultEditManager(publisher, trackManager, editId)

logger.info("Step 2/3: Upload bundle for $editId")
logger.info("Step 2/4: Upload bundle for $editId")

val versionCode = editManager.uploadBundle(file, ResolutionStrategy.IGNORE)

Expand All @@ -68,7 +68,7 @@ abstract class PlayUploadWork : WorkAction<PlayUploadParameters> {
return
}

logger.info("Step 3/3: Pushing $releaseName to $track at P=$priority V=$versionCode")
logger.info("Step 3/4: Pushing $releaseName to $track at P=$priority V=$versionCode")

trackManager.update(
config =
Expand All @@ -77,12 +77,16 @@ abstract class PlayUploadWork : WorkAction<PlayUploadParameters> {
versionCodes = listOf(versionCode),
didPreviousBuildSkipCommit = false,
TrackManager.BaseConfig(
userFraction = parameters.versionCode.orNull ?: 0.1,
updatePriority = priority,
releaseName = parameters.releaseName.get(),
),
),
)
logger.info("Step 3/3: Bundle upload successful")

logger.info("Step 3/4: Commit $editId")

publisher.commitEdit(editId)

logger.info("Step 4/4: Bundle upload successful")
}
}
Loading