Skip to content

Commit b0a998c

Browse files
[CD] Fix version management
1 parent 2e7591f commit b0a998c

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

ci-scripts/incrementVersion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright (c) 2021 Vilius Sutkus <ViliusSutkus89@gmail.com>
55
#
66
# https://github.com/ViliusSutkus89/Sample_Android_Library-MavenCentral-Instrumented_Tests
7-
# ci-scripts/incrementVersion - v1.1.5
7+
# ci-scripts/incrementVersion - v1.3.0
88
#
99
# Permission is hereby granted, free of charge, to any person obtaining a copy
1010
# of this software and associated documentation files (the "Software"), to deal

ci-scripts/updateDownstreamVersion

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ $versionUpdater->update('README.md', sub {
6060

6161
$versionUpdater->update('application/app/build.gradle', sub {
6262
$_ = shift;
63-
# Update versionName and versionCode of sample application to have the same version as the library.
64-
# Purely for semantic reasons.
65-
s/^(\s+versionName\s+['"])[\d\.]+(['"])$/${1}${version}${2}/;
66-
s/^(\s+versionCode\s+)\d+$/${1}${versionCode}/;
67-
6863
# Update the version of library, which this sample application depends on.
6964
s/^(\s+implementation\s+['"]com\.viliussutkus89\:pdf2htmlex-android\:)[\d\.]+(['"])$/${1}${version}${2}/;
65+
66+
# Update versionName of sample application to be the same as the library, but with ".0" at the end.
67+
s/^(\s+versionName\s+['"])[\d\.]+(['"])$/${1}${version}.0${2}/;
68+
69+
# Update versionCode of sample application to be the same as the library.
70+
s/^(\s+versionCode\s+)\d+$/${1}${versionCode}/;
7071
return $_;
7172
});
7273

0 commit comments

Comments
 (0)