Hi365 APK Packager false ylhealth BUILD_BRANCH APK build env develop master 2 https://cm.ylhealth.org/gitlab/YongYue/hi365-app.git 3485e854-8389-40e8-8c86-b94e94e91904 */${BUILD_BRANCH} false Mac_Node1 false false false false false project_path=$(pwd) cd ${project_path}/android app_version=$(grep 'version:' pubspec.yaml | cut -d ' ' -f2) # determine build type by git branch if [ $BUILD_BRANCH == "master" ] then build_type="release" else build_type="debug" fi output_path="${project_path}/build/app/outputs/apk/${build_type}" app_name="hi365_SIT_${build_type}-${app_version}.apk" flutter build apk --${build_type} # rename apk name mv ${output_path}/app-${build_type}.apk ${output_path}/${app_name} false false