Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask_android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leap
bitmask_android
Commits
fd2d9c52
Commit
fd2d9c52
authored
Mar 25, 2021
by
cyberta
Browse files
Options
Downloads
Patches
Plain Diff
parametrize verbose build logging
parent
07372e3e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!133
Fix releasing
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/prepareForDistribution.sh
+17
-12
17 additions, 12 deletions
scripts/prepareForDistribution.sh
with
17 additions
and
12 deletions
scripts/prepareForDistribution.sh
+
17
−
12
View file @
fd2d9c52
...
...
@@ -100,6 +100,7 @@ DO_BUILD=false
DO_SIGN
=
false
BETA
=
false
NO_TAG
=
false
STACKTRACE
=
""
FLAVOR
=
"Normal"
FLAVOR_LOWERCASE
=
"normal"
EXPECTED_FINGERPRINT
=
"SHA256:9C:94:DB:F8:46:FD:95:97:47:57:17:2A:6A:8D:9A:9B:DF:8C:40:21:A6:6C:15:11:28:28:D1:72:39:1B:81:AA"
...
...
@@ -174,6 +175,9 @@ do
elif
[[
${
!i
}
=
"-no-tag"
]]
;
then
NO_TAG
=
true
elif
[[
${
!i
}
=
"-s"
||
${
!i
}
=
"-stacktrace"
]]
then
STACKTRACE
=
"--stacktrace"
elif
[[
${
!i
}
=
"-c"
||
${
!i
}
=
"-custom"
]]
then
((
i++
))
...
...
@@ -194,7 +198,7 @@ do
-u will be ignored (optional)
build [-v, -c, -b, -no-tag]
build [-v, -c, -b, -no-tag
, -s
]
-v / -version [gittag] -------------- define the git version tag that needs to be checked out
for building. It's also part of the resulting apk file
name. (required if you don't use -no-tag)
...
...
@@ -203,6 +207,7 @@ do
-b / -beta -------------------------- build beta version with .beta appended to applicationId (optional)
-no-tag ----------------------------- force to build current checked out git commit instead of an
official release version
-s / -stacktrace -------------------- show verbose debug output
-h / -help print out this help
...
...
@@ -286,50 +291,50 @@ then
if
[[
${
BETA
}
==
true
]]
then
echo
"
${
GREEN
}
-> build beta releases for flavor
${
FLAVOR
}${
NC
}
"
./gradlew clean assemble
${
FLAVOR
}
ProductionFatBeta
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionFatBeta
$STACKTRACE
||
quit
# echo "copy file: $(ls $BASE_OUTPUT_DIR/${FLAVOR_LOWERCASE}ProductionFat/beta/*.apk)"
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionFat/beta/
*
.apk
$RELEASES_FILE_DIR
/.
# custom builds might have disabled split apks -> check if build task exist
if
[[
$(
./gradlew tasks
--console
plain |
grep
${
FLAVOR
}
ProductionX86Beta
)
]]
;
then
./gradlew clean assemble
${
FLAVOR
}
ProductionX86Beta
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionX86Beta
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionX86/beta/
*
.apk
$RELEASES_FILE_DIR
/.
fi
if
[[
$(
./gradlew tasks
--console
plain |
grep
${
FLAVOR
}
ProductionX86_64Beta
)
]]
;
then
./gradlew clean assemble
${
FLAVOR
}
ProductionX86_64Beta
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionX86_64Beta
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionX86_64/beta/
*
.apk
$RELEASES_FILE_DIR
/.
fi
if
[[
$(
./gradlew tasks
--console
plain |
grep
${
FLAVOR
}
ProductionArmv7Beta
)
]]
;
then
./gradlew clean assemble
${
FLAVOR
}
ProductionArmv7Beta
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionArmv7Beta
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionArmv7/beta/
*
.apk
$RELEASES_FILE_DIR
/.
fi
if
[[
$(
./gradlew tasks
--console
plain |
grep
${
FLAVOR
}
ProductionArmv7Beta
)
]]
;
then
./gradlew clean assemble
${
FLAVOR
}
ProductionArm64Beta
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionArm64Beta
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionArm64/beta/
*
.apk
$RELEASES_FILE_DIR
/.
fi
else
echo
-e
"
${
GREEN
}
-> build stable releases for flavor
${
FLAVOR
}${
NC
}
"
./gradlew clean assemble
${
FLAVOR
}
ProductionFatRelease
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionFatRelease
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionFat/release/
*
.apk
$RELEASES_FILE_DIR
/.
./gradlew clean assemble
${
FLAVOR
}
ProductionFatwebRelease
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionFatwebRelease
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionFatweb/release/
*
.apk
$RELEASES_FILE_DIR
/.
# custom builds might have disabled split apks -> check if build task exist
if
[[
$(
./gradlew tasks
--console
plain |
grep
${
FLAVOR
}
ProductionX86Release
)
]]
;
then
./gradlew clean assemble
${
FLAVOR
}
ProductionX86Release
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionX86Release
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionX86/release/
*
.apk
$RELEASES_FILE_DIR
/.
fi
if
[[
$(
./gradlew tasks
--console
plain |
grep
${
FLAVOR
}
ProductionX86_64Release
)
]]
;
then
./gradlew clean assemble
${
FLAVOR
}
ProductionX86_64Release
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionX86_64Release
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionX86_64/release/
*
.apk
$RELEASES_FILE_DIR
/.
fi
if
[[
$(
./gradlew tasks
--console
plain |
grep
${
FLAVOR
}
ProductionArmv7Release
)
]]
;
then
./gradlew clean assemble
${
FLAVOR
}
ProductionArmv7Release
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionArmv7Release
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionArmv7/release/
*
.apk
$RELEASES_FILE_DIR
/.
fi
if
[[
$(
./gradlew tasks
--console
plain |
grep
${
FLAVOR
}
ProductionArm64Release
)
]]
;
then
./gradlew clean assemble
${
FLAVOR
}
ProductionArm64Release
--stacktrace
||
quit
./gradlew clean assemble
${
FLAVOR
}
ProductionArm64Release
$STACKTRACE
||
quit
cp
$BASE_OUTPUT_DIR
/
${
FLAVOR_LOWERCASE
}
ProductionArm64/release/
*
.apk
$RELEASES_FILE_DIR
/.
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment