Skip to content

Commit 3447658

Browse files
author
Pablo Orgaz
committed
Add version script
1 parent 17fc3d5 commit 3447658

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

mini-android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies {
2727

2828
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0"
2929
api "androidx.appcompat:appcompat:1.1.0"
30-
api "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-alpha05"
30+
api "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-rc03"
3131

3232
testImplementation "junit:junit:4.12"
3333
androidTestImplementation "androidx.test:runner:1.2.0"

scripts/publish_patch.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
require_clean_work_tree () {
4+
# Update the index
5+
git update-index -q --ignore-submodules --refresh
6+
err=0
7+
8+
# Disallow unstaged changes in the working tree
9+
if ! git diff-files --quiet --ignore-submodules --
10+
then
11+
echo >&2 "cannot $1: you have unstaged changes."
12+
git diff-files --name-status -r --ignore-submodules -- >&2
13+
err=1
14+
fi
15+
16+
# Disallow uncommitted changes in the index
17+
if ! git diff-index --cached --quiet HEAD --ignore-submodules --
18+
then
19+
echo >&2 "cannot $1: your index contains uncommitted changes."
20+
git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2
21+
err=1
22+
fi
23+
24+
if [[ ${err} = 1 ]]
25+
then
26+
echo >&2 "Please commit or stash them."
27+
exit 1
28+
fi
29+
}
30+
31+
require_clean_work_tree
32+
33+
git pull
34+
git pull --tags
35+
36+
require_clean_work_tree
37+
38+
./gradlew clean build test || exit 1
39+
40+
# Install semver pip3 install semver
41+
next_tag=$(git semver --next-patch)
42+
echo ${next_tag}
43+
git tag ${next_tag}
44+
git push --tags
45+
git push
46+

0 commit comments

Comments
 (0)