diff --git a/tool/_build.dart b/tool/_build.dart index 4e95b2d9..249976df 100644 --- a/tool/_build.dart +++ b/tool/_build.dart @@ -16,17 +16,11 @@ buildApk() async { String date = DateUtil.formatDate(DateTime.now(), format: 'yy_MM_dd_HH_mm'); String version = await getVersion(); - await runAsync('rmdir', arguments: ['-f', Config.apkDir]); - await runAsync('mkdir', arguments: [ Config.apkDir]); - await runAsync('move', arguments: [ + await runAsync('rm', arguments: ['-rf', Config.apkDir]); + await runAsync('mkdir', arguments: ['-p', Config.apkDir]); + await runAsync('mv', arguments: [ Config.buildPath, - '${Config.apkDir}\\${Config.packageName}_${version}_release_$date.apk' - ]); - await runAsync('ren',arguments: [ - - '${Config.apkDir}\\app-release.apk', - - '${Config.apkDir}\\${Config.packageName}_${version}_release_$date.apk', + '${Config.apkDir}/${Config.packageName}_${version}_release_$date.apk' ]); } diff --git a/tool/config.dart b/tool/config.dart deleted file mode 100644 index 36daa606..00000000 --- a/tool/config.dart +++ /dev/null @@ -1,19 +0,0 @@ -class Config { - ///用户根目录 - static const String homeDir = '/users/zhangmeng'; - - ///包名 - static const String packageName = 'aku_new_community'; - - ///打包目录 - static String get buildPath => - './build/app/outputs/flutter-apk/app-release.apk'; - - ///测试包文件夹 - static String get apkDevDir => - '$homeDir/team/bee/aku_new_community_manager/dev'; - - ///正式包文件夹 - static String get apkDir => - '$homeDir/team/bee/aku_new_community_manager/release'; -}