Commit 3162e85c authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20180082: Job [Hi365_Android] configuration updated

Change performed by ³¯¾_¶§
parent c1d29c16
......@@ -54,6 +54,10 @@ cd ${project_path}/android
app_version=$(grep 'version:' pubspec.yaml | cut -d ' ' -f2)
current_date=$(date +"%Y%m%d")
git_short_hash=$(git rev-parse --short HEAD)
# determine build type by git branch
if [ $BUILD_BRANCH == "master" ]
then
......@@ -62,13 +66,19 @@ else
build_type="debug"
fi
output_path="${project_path}/build/app/outputs/apk/${build_type}"
app_name="hi365_SIT_${build_type}-${app_version}.apk"
apk_name="hi365_SIT_${current_date}-${git_short_hash}.apk"
apk_path="${project_path}/build/app/outputs/apk/${build_type}/${apk_name}"
flutter build apk --${build_type}
# rename apk name
mv ${output_path}/app-${build_type}.apk ${output_path}/${app_name}</command>
mv ${output_path}/app-${build_type}.apk ${apk_path}
# deploy
echo &quot;Deploy to APK repository&quot;
scp -i ~/jenkins/jenkins ${apk_path} appuploader@10.57.117.135:~/app/Hi365/${apk_name}</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment