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
79658de3
Commit
79658de3
authored
Nov 28, 2021
by
cyberta
Browse files
Options
Downloads
Patches
Plain Diff
use snake_case instead of camelCase for functions in bash
parent
7e775847
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!149
build and sign aabs
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/prepareForDistribution.sh
+7
-7
7 additions, 7 deletions
scripts/prepareForDistribution.sh
with
7 additions
and
7 deletions
scripts/prepareForDistribution.sh
+
7
−
7
View file @
79658de3
...
@@ -18,11 +18,11 @@
...
@@ -18,11 +18,11 @@
function
quit
{
function
quit
{
echo
-e
"
${
RED
}
Task failed. Exit value:
$?
.
${
NC
}
"
echo
-e
"
${
RED
}
Task failed. Exit value:
$?
.
${
NC
}
"
clean
U
p
clean
_u
p
exit
1
exit
1
}
}
function
clean
U
p
{
function
clean
_u
p
{
if
[[
-f
${
ALIGNED_UNSIGNED_APK
}
]]
;
then
if
[[
-f
${
ALIGNED_UNSIGNED_APK
}
]]
;
then
rm
${
ALIGNED_UNSIGNED_APK
}
rm
${
ALIGNED_UNSIGNED_APK
}
fi
fi
...
@@ -46,7 +46,7 @@ function sign {
...
@@ -46,7 +46,7 @@ function sign {
sign_apk
$FILE_NAME
$FILE_DIR
sign_apk
$FILE_NAME
$FILE_DIR
fi
fi
clean
U
p
clean
_u
p
gpg_sign
$FILE_NAME_STRING
gpg_sign
$FILE_NAME_STRING
}
}
...
@@ -57,7 +57,7 @@ function sign_apk {
...
@@ -57,7 +57,7 @@ function sign_apk {
FINAL_APK
=
"
${
FILE_DIR
}
/
${
FILE_NAME
}
"
FINAL_APK
=
"
${
FILE_DIR
}
/
${
FILE_NAME
}
"
echo
-e
"
${
GREEN
}
-> apksign
${
FINAL_APK
}${
NC
}
"
echo
-e
"
${
GREEN
}
-> apksign
${
FINAL_APK
}${
NC
}
"
${
ANDROID_BUILD_TOOLS
}
/apksigner sign
--ks
"
${
KEY_STORE_STRING
}
"
--out
${
FINAL_APK
}
${
FINAL_APK
}
||
quit
${
ANDROID_BUILD_TOOLS
}
/apksigner sign
--ks
"
${
KEY_STORE_STRING
}
"
--out
${
FINAL_APK
}
${
FINAL_APK
}
||
quit
verify
S
igned
$FINAL_APK
verify
_s
igned
$FINAL_APK
}
}
function
sign_bundle
{
function
sign_bundle
{
...
@@ -77,10 +77,10 @@ function sign_bundle {
...
@@ -77,10 +77,10 @@ function sign_bundle {
echo
"jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore "
KEY_STORE_STRING
"
$FINAL_AAB
$KEYSTORE_ALIAS
echo
"jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore "
KEY_STORE_STRING
"
$FINAL_AAB
$KEYSTORE_ALIAS
"
"
jarsigner
-verbose
-sigalg
SHA256withRSA
-digestalg
SHA-256
-keystore
"
${
KEY_STORE_STRING
}
"
$FINAL_AAB
$KEYSTORE_ALIAS
||
quit
jarsigner
-verbose
-sigalg
SHA256withRSA
-digestalg
SHA-256
-keystore
"
${
KEY_STORE_STRING
}
"
$FINAL_AAB
$KEYSTORE_ALIAS
||
quit
verify
S
igned
$FINAL_AAB
verify
_s
igned
$FINAL_AAB
}
}
function
verify
S
igned
{
function
verify
_s
igned
{
FINAL_FILE
=
$1
FINAL_FILE
=
$1
FINGERPRINT
=
$(
unzip
-p
${
FINAL_FILE
}
META-INF/
*
.RSA | keytool
-printcert
|
grep
"SHA256"
|
tr
-d
'[:space:]'
)
||
quit
FINGERPRINT
=
$(
unzip
-p
${
FINAL_FILE
}
META-INF/
*
.RSA | keytool
-printcert
|
grep
"SHA256"
|
tr
-d
'[:space:]'
)
||
quit
...
@@ -141,7 +141,7 @@ export NC=${NC}
...
@@ -141,7 +141,7 @@ export NC=${NC}
export
EXPECTED_FINGERPRINT
=
${
EXPECTED_FINGERPRINT
}
export
EXPECTED_FINGERPRINT
=
${
EXPECTED_FINGERPRINT
}
export
-f
sign
export
-f
sign
export
-f
quit
export
-f
quit
export
-f
clean
U
p
export
-f
clean
_u
p
# init parameters
# init parameters
...
...
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