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
4220a904
Commit
4220a904
authored
Jan 24, 2019
by
app.developer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
378a14f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
24 deletions
+9
-24
apk_script/auto_upload_pgy.sh
+9
-24
No files found.
apk_script/auto_upload_pgy.sh
View file @
4220a904
...
@@ -28,32 +28,14 @@ DD_DOWN_URL=$8
...
@@ -28,32 +28,14 @@ DD_DOWN_URL=$8
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
))
if
[
!
-
n
"
${
NOW
}
"
]
;
then
if
[
!
-
f
"
${
EBIZ_APK_PATH
}
"
]
;
then
echo_error
"
auto-upload 入参 'now' 有误!
"
echo_error
"
${
EBIZ_APK_PATH
}
文件不存在
"
exit
1
exit
1
else
fi
echo
"构建时间:
${
NOW
}
"
fi
if
[
!
-n
"
${
EBIZ_APK_PATH
}
"
]
;
then
echo_error
"auto-upload 入参 'ipa_path' 有误!"
exit
1
else
if
[
!
-f
"
${
EBIZ_APK_PATH
}
"
]
;
then
echo_error
"
${
EBIZ_APK_PATH
}
文件不存在"
exit
1
fi
echo_log
"apk 文件 path 为
${
EBIZ_APK_PATH
}
"
fi
readonly
PGY_UPLOAD_SERVER
=
"https://qiniu-storage.pgyer.com/apiv1/app/upload"
# 接收键盘输入
PGY_UPLOAD_SERVER
=
"https://qiniu-storage.pgyer.com/apiv1/app/upload"
readonly
PGY_password
=
"
$((
$RANDOM
%
9999
+
1111
))
"
PGY_password
=
"
$((
$RANDOM
%
9999
+
1111
))
"
readonly
PGY_upload_log
=
"
${
EBIZ_ENV
}
_
${
NOW
}
"
PGY_upload_log
=
"
${
EBIZ_ENV
}
_
${
NOW
}
"
# 上传到蒲公英,并接收 Response
PGY_RESPONSE
=
`
curl
-F
"file=@/
${
EBIZ_APK_PATH
}
"
-F
"uKey=
${
PGY_USER_KEY
}
"
-F
"_api_key=
${
PGY_API_KEY
}
"
-F
installType
=
2
-F
password
=
"
${
PGY_password
}
"
-F
"updateDescription=
${
PGY_upload_log
}
"
${
PGY_UPLOAD_SERVER
}
`
if
[
"
$?
"
-ne
"0"
]
;
then
if
[
"
$?
"
-ne
"0"
]
;
then
echo_error
"upload error"
echo_error
"upload error"
...
@@ -75,6 +57,9 @@ echo_log ${EBIZ_APP_Name}
...
@@ -75,6 +57,9 @@ echo_log ${EBIZ_APP_Name}
echo_log
${
EBIZ_Version
}
echo_log
${
EBIZ_Version
}
echo_log
${
PGY_password
}
echo_log
${
PGY_password
}
# 上传到蒲公英,并接收 Response
PGY_RESPONSE
=
`
curl
-F
"file=@/
${
EBIZ_APK_PATH
}
"
-F
"uKey=
${
PGY_USER_KEY
}
"
-F
"_api_key=
${
PGY_API_KEY
}
"
-F
installType
=
2
-F
password
=
"
${
PGY_password
}
"
-F
"updateDescription=
${
PGY_upload_log
}
"
${
PGY_UPLOAD_SERVER
}
`
# (以上调试完成后,再打开以下注释)
# (以上调试完成后,再打开以下注释)
if
[
$#
-eq
8
]
;
then
if
[
$#
-eq
8
]
;
then
...
...
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