Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Android-AutoPackage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
app
Android-AutoPackage
Commits
038b31bd
Commit
038b31bd
authored
Jan 31, 2019
by
app.developer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改和优化
parent
890021ff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
android_package.sh
+4
-4
apk_script/auto_push_ding_talk.py
+7
-1
apk_script/auto_upload_pgy.sh
+3
-2
No files found.
android_package.sh
View file @
038b31bd
...
@@ -4,7 +4,7 @@ BUILD_ENV=$(echo $1 | tr '[a-z]' '[A-Z]')
...
@@ -4,7 +4,7 @@ BUILD_ENV=$(echo $1 | tr '[a-z]' '[A-Z]')
BUILD_TYPE
=
"
$(
echo
${
2
:0:1
}
| tr
'[a-z]'
'[A-Z]'
)$(
echo
${
2
:1
}
| tr
'[A-Z]'
'[a-z]'
)
"
BUILD_TYPE
=
"
$(
echo
${
2
:0:1
}
| tr
'[a-z]'
'[A-Z]'
)$(
echo
${
2
:1
}
| tr
'[A-Z]'
'[a-z]'
)
"
# yes or no
# yes or no
DD_
MESSAGE
=
$(
echo
$3
| tr
'[A-Z]'
'[a-z]'
)
DD_
PUSH
=
$(
echo
$3
| tr
'[A-Z]'
'[a-z]'
)
if
[
!
-n
"
${
BUILD_ENV
}
"
]
;
then
if
[
!
-n
"
${
BUILD_ENV
}
"
]
;
then
echo
"入参 'BUILD_ENV' 有误!"
echo
"入参 'BUILD_ENV' 有误!"
...
@@ -16,8 +16,8 @@ if [ ! -n "${BUILD_TYPE}" ] ;then
...
@@ -16,8 +16,8 @@ if [ ! -n "${BUILD_TYPE}" ] ;then
exit
1
exit
1
fi
fi
if
[
!
-n
"
${
DD_
MESSAGE
}
"
]
;
then
if
[
!
-n
"
${
DD_
PUSH
}
"
]
;
then
echo
"入参 'DD_
MESSAGE
' 有误!"
echo
"入参 'DD_
PUSH
' 有误!"
exit
1
exit
1
fi
fi
...
@@ -50,4 +50,4 @@ cp -r ${SCRIPT_PATH}/apk_script ${WORKSPACE}
...
@@ -50,4 +50,4 @@ cp -r ${SCRIPT_PATH}/apk_script ${WORKSPACE}
# 修改环境文件
# 修改环境文件
cp
-r
${
WORKSPACE
}
/app/src/main/res/values/ccbpi_env/
${
BUILD_ENV
}
.xml
${
WORKSPACE
}
/app/src/main/res/values/ccbpi.xml
cp
-r
${
WORKSPACE
}
/app/src/main/res/values/ccbpi_env/
${
BUILD_ENV
}
.xml
${
WORKSPACE
}
/app/src/main/res/values/ccbpi.xml
sh
${
WORKSPACE
}
/apk_script/auto_package_apk.sh
${
BUILD_ENV
}
${
BUILD_TYPE
}
${
PGY_API_KEY
}
${
PGY_USER_KEY
}
${
DD_HOST_URL
}
${
DD_
MESSAGE
}
sh
${
WORKSPACE
}
/apk_script/auto_package_apk.sh
${
BUILD_ENV
}
${
BUILD_TYPE
}
${
PGY_API_KEY
}
${
PGY_USER_KEY
}
${
DD_HOST_URL
}
${
DD_
PUSH
}
apk_script/auto_push_ding_talk.py
View file @
038b31bd
...
@@ -33,13 +33,19 @@ def get_pgy_pwd():
...
@@ -33,13 +33,19 @@ def get_pgy_pwd():
return
sys
.
argv
[
7
]
return
sys
.
argv
[
7
]
pass
pass
def
get_pgy_message
():
return
sys
.
argv
[
8
]
pass
def
get_request_params_str
():
def
get_request_params_str
():
app_env
=
get_app_env
()
app_env
=
get_app_env
()
app_pwd
=
get_pgy_pwd
()
app_pwd
=
get_pgy_pwd
()
message
=
app_env
+
" 已更新"
+
" 密码:"
+
app_pwd
app_message
=
get_pgy_message
()
message
=
app_env
+
" 已更新"
+
" 密码:"
+
app_pwd
+
" "
+
app_message
print
message
print
message
...
...
apk_script/auto_upload_pgy.sh
View file @
038b31bd
...
@@ -23,6 +23,7 @@ EBIZ_APP_Build_Version=$3
...
@@ -23,6 +23,7 @@ EBIZ_APP_Build_Version=$3
PGY_API_KEY
=
$4
PGY_API_KEY
=
$4
PGY_USER_KEY
=
$5
PGY_USER_KEY
=
$5
DD_HOST_URL
=
$6
DD_HOST_URL
=
$6
DD_MESSAGE
=
$7
"."
CURRENT_DIR
=
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
)
CURRENT_DIR
=
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
)
PROJECT_PATH
=
$(
dirname
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
))
PROJECT_PATH
=
$(
dirname
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
))
...
@@ -38,7 +39,7 @@ fi
...
@@ -38,7 +39,7 @@ fi
PGY_UPLOAD_SERVER
=
"https://qiniu-storage.pgyer.com/apiv1/app/upload"
PGY_UPLOAD_SERVER
=
"https://qiniu-storage.pgyer.com/apiv1/app/upload"
PGY_password
=
"
$((
$RANDOM
%
9999
+
1111
))
"
PGY_password
=
"
$((
$RANDOM
%
9999
+
1111
))
"
PGY_upload_log
=
"
${
EBIZ_ENV
}
_
${
NOW
}
"
PGY_upload_log
=
"
${
EBIZ_ENV
}
_
${
NOW
}
,
${
DD_MESSAGE
}
"
# 推送到钉钉机器人时显示打包的版本号
# 推送到钉钉机器人时显示打包的版本号
APK_INFO
=
$(
aapt d badging
$EBIZ_APK_PATH
|
grep
package
)
APK_INFO
=
$(
aapt d badging
$EBIZ_APK_PATH
|
grep
package
)
...
@@ -70,7 +71,7 @@ fi
...
@@ -70,7 +71,7 @@ fi
# (以上调试完成后,再打开以下注释)
# (以上调试完成后,再打开以下注释)
if
[
$#
-eq
6
]
;
then
if
[
$#
-eq
6
]
;
then
python
${
CURRENT_DIR
}
/auto_push_ding_talk.py
${
EBIZ_Version
}
${
EBIZ_APP_Name
}
${
EBIZ_ENV
}
${
DD_ICON_URL
//\
"/}
${
DD_DOWN_URL
//\
"/}
${
DD_HOST_URL
}
${
PGY_password
}
python
${
CURRENT_DIR
}
/auto_push_ding_talk.py
${
EBIZ_Version
}
${
EBIZ_APP_Name
}
${
EBIZ_ENV
}
${
DD_ICON_URL
//\
"/}
${
DD_DOWN_URL
//\
"/}
${
DD_HOST_URL
}
${
PGY_password
}
${
DD_MESSAGE
}
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment