Skip to content

Commit 3f85357

Browse files
committed
Ensure official builds still detect compatible android apks properly
1 parent 4ca999c commit 3f85357

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

util/buildscripts/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ echo "Platform: $PLATFORM";
295295
echo "Build root: $BUILD_ROOT";
296296
echo "Repository root: $REPO_ROOT";
297297

298+
export GITHASH=$(cd "${REPO_ROOT}" && git rev-parse HEAD)
299+
298300
if [[ "$TYPE" == "official" ]]; then
299301

300302
sed -i.bak "s%RENDERDOC_OFFICIAL_BUILD 0%RENDERDOC_OFFICIAL_BUILD 1%" "${REPO_ROOT}"/renderdoc/api/replay/version.h
@@ -304,7 +306,7 @@ if [[ "$TYPE" == "official" ]]; then
304306

305307
else # snapshot
306308

307-
export GITTAG=$(cd "${REPO_ROOT}" && git rev-parse HEAD)
309+
export GITTAG=$GITHASH
308310

309311
fi;
310312

util/buildscripts/scripts/compile_win32.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ AAPT=$(ls $ANDROID_SDK/build-tools/*/aapt{,.exe} 2>/dev/null | tail -n 1)
116116
VERSION32=$($AAPT dump badging build-android-arm32/bin/*apk 2>/dev/null | grep -Eo "versionName='[0-9a-f]*'" | grep -Eo "'.*'" | tr -d "'")
117117
VERSION64=$($AAPT dump badging build-android-arm64/bin/*apk 2>/dev/null | grep -Eo "versionName='[0-9a-f]*'" | grep -Eo "'.*'" | tr -d "'")
118118

119-
if [ "$VERSION32" == "$GITTAG" ]; then
119+
if [ "$VERSION32" == "$GITHASH" ]; then
120120

121-
echo "Found existing compatible arm32 build at $GITTAG, not rebuilding";
121+
echo "Found existing compatible arm32 build at $GITHASH, not rebuilding";
122122

123123
else
124124

125+
echo "Rebuilding as existing build is $VERSION32";
126+
125127
# Build the arm32 variant
126128
rm -rf build-android-arm32
127129
mkdir -p build-android-arm32
@@ -143,12 +145,14 @@ else
143145

144146
fi
145147

146-
if [ "$VERSION64" == "$GITTAG" ]; then
148+
if [ "$VERSION64" == "$GITHASH" ]; then
147149

148-
echo "Found existing compatible arm64 build at $GITTAG, not rebuilding";
150+
echo "Found existing compatible arm64 build at $GITHASH, not rebuilding";
149151

150152
else
151153

154+
echo "Rebuilding as existing build is $VERSION64";
155+
152156
rm -rf build-android-arm64
153157
mkdir -p build-android-arm64
154158
pushd build-android-arm64

0 commit comments

Comments
 (0)