0.1.3 • Published 2 months ago

wallet-app v0.1.3

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

wallet-app

Mac 打包 安卓 命令执行:

yarn apk-dev clean vn-0.0.8 vc-8 mac

apk-dev 打包开发环境 apk-qa 打包QA环境 apk-prod 打包生产环境

clean vn-0.0.8 vc-8 mac 后面这一段都是可选项, vn会改版本名称, vc是版本code

安卓 && iOS 打包流程

记录版本信息到 releases.md

  • 发布版本号
  • 代码分支 -- release\${发布版本号} (每次发布记得新增一个分支)
  • 发布日期
  • 更新记录
  • 更新人

安卓打包步骤

  • cd /Users/mosai/Desktop/xx/android //cd 到安卓项目目录下
  • 修改版本号, 配置文件地址:android > app > build.gradle, 配置节点:android > defaultConfig > versionName "1.0.0"
  • ./gradlew clean //清除已打出的包
  • ./gradlew assembleRelease //build apk 包命令
  • cd /xx/android/app/build/outputs/apk/release/app-release.apk //构建生成的地址

如果打包遇到错误,需要到安卓下依赖库特殊处理

  • react-native-push-notification
  • 默认的版本号是 23 不适配高版本的环境,需要修改版本号

    def DEFAULT_COMPILE_SDK_VERSION = 26

def DEFAULT_BUILD_TOOLS_VERSION = "26.0.1"

def DEFAULT_TARGET_SDK_VERSION = 26

def DEFAULT_SUPPORT_LIB_VERSION = "26.0.1"

def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = "+"

def DEFAULT_FIREBASE_MESSAGING_VERSION = "+"

  • react-native-maps 同上

    def DEFAULT_COMPILE_SDK_VERSION = 25

def DEFAULT_BUILD_TOOLS_VERSION = "25.0.3"

def DEFAULT_TARGET_SDK_VERSION = 25

def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = "+"

def DEFAULT_ANDROID_MAPS_UTILS_VERSION = "+"

iOS 打包步骤

  • 通过 xcode 打开项目文件 .xcworkspace
  • 切换到编译模式
  • 点击工具栏 Product -> Archive 自动编译打包
  • 生成的包目录以及导出方式参考网易上述操作

上传应用商店

-

GIT 提交规范

  • 1、提交格式 (注意冒号后面有空格)
<type><(scope)>: <subject>

eg: feat(user): #001 - 完成用户注册
eg: fix(user): #201 - 修复用户注册问题
  • 2、type 类型说明
用于说明 commit 的类别,只允许使用下面7个标识。
 * feat:新功能(feature)
 * fix:修补bug
 * docs:文档(documentation)
 * style: 格式(不影响代码运行的变动)
 * refactor:重构(即不是新增功能,也不是修改bug的代码变动)
 * test:增加测试
 * chore:构建过程或辅助工具的变动
如果type为feat和fix,则该 commit 将肯定出现在 Change log 之中。
  • 3、scope
scope 用于说明 commit 影响的范围,比如数据层、控制层、视图层等等,视项目不同而不同。或者按照Epic,用户模块、订单模块、合同模块。
  • 4、subject
subject是 commit 目的的简短描述,不超过50个字符,最少5个字符,且结尾不加句号(.)。

使用工具校验 commit 是否符合规范

  • 1、全局安装
# For Mac
npm install --save-dev @commitlint/{config-conventional,cli}
# For Windows:
npm install --save-dev @commitlint/config-conventional @commitlint/cli
  • 2、生成配置配件
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js

修改规则

module.exports = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [2, 'always', [
      "feat", "fix", "docs", "style", "refactor", "test", "chore", "revert"
    ]],
    'subject-full-stop': [0, 'never'],
    'subject-case': [0, 'never']
  }
}
  • 3、安装 husky
npm install husky --save-dev

配置,修改package.json

"scripts": {
    "commitmsg": "commitlint -e $GIT_PARAMS",

 },
 "config": {
    "commitizen": {
      "path": "cz-customizable"
    }
 },
  • 4、最后,git 正常提交
F:\accesscontrol\access_control>git commit -m "featdf: aas"
husky > npm run -s commitmsg (node v8.2.1)

⧗   input:
featdf: aas

✖   type must be one of [feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert] [type-enum]
✖   found 1 problems, 0 warnings

husky > commit-msg hook failed (add --no-verify to bypass)
  • 5、相关资料
https://github.com/conventional-changelog/commitlint

https://www.jianshu.com/p/201bd81e7dc9?utm_source=oschina-app

https://blog.csdn.net/y491887095/article/details/80594043

##打包

1.iOS 项目目录下运行下面代码,

react-native bundle --entry-file index.js --bundle-output ./ios/bundle/index.ios.jsbundle --platform ios --assets-dest ./ios/bundle --dev false

index.ios.bundle 和 assets 加入到项目中,然后打包

2.Android 项目目录运行下面代码,打包

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

android 下执行

./gradlew assembleRelease -x bundleReleaseJsAndAssets
@baronha/react-native-multiple-image-picker@ethersproject/pbkdf2@laverna_ritchie5/xwallet@react-native-async-storage/async-storage@react-native-community/art@react-native-community/cameraroll@react-native-community/clipboard@react-native-community/netinfo@react-native-community/viewpager@react-native-picker/picker@sentry/react-native@tradle/react-native-http@wuye/react-native-subsampling-scale-imagealiyun-oss-react-nativeassertaxiosbig-integerbig.jsbuffercrypto-jscurrency-formatterdebounce-decoratorhttps-browserifyjcore-react-nativejpush-react-nativelodashlottie-react-nativememoize-onemittmobxmobx-reactmomentnative-echartspatch-packageprop-typesqsreactreact-nativereact-native-actionsheetreact-native-aes-cryptoreact-native-agorareact-native-alert-proreact-native-audio-recorder-playerreact-native-background-timerreact-native-beautiful-video-recorderreact-native-camerareact-native-common-date-pickerreact-native-compressorreact-native-create-thumbnailreact-native-cryptoreact-native-dashed-linereact-native-device-inforeact-native-document-pickerreact-native-easy-toastreact-native-elementsreact-native-fast-imagereact-native-file-viewerreact-native-fsreact-native-gesture-handlerreact-native-gifted-chatreact-native-i18nreact-native-image-base64react-native-image-sizereact-native-image-zoom-viewerreact-native-keyboard-aware-scroll-viewreact-native-keychainreact-native-klinereact-native-level-fsreact-native-linear-gradientreact-native-loaderreact-native-local-barcode-recognizerreact-native-localizereact-native-markdown-displayreact-native-modalboxreact-native-orientationreact-native-osreact-native-permissionsreact-native-pickerreact-native-progressreact-native-qrcode-svgreact-native-randombytesreact-native-read-more-textreact-native-reanimatedreact-native-safe-area-contextreact-native-scrollable-tab-viewreact-native-soundreact-native-splash-screenreact-native-sqlite-storagereact-native-step-indicatorreact-native-storagereact-native-svgreact-native-swipe-list-viewreact-native-swiperreact-native-tab-navigatorreact-native-tcpreact-native-touch-idreact-native-ttsreact-native-underline-tabbarreact-native-vector-iconsreact-native-videoreact-native-view-shotreact-native-webviewreact-navigationreact-navigation-stackreadable-streamremove-markdownshelljsstreamstream-browserifyurlvm-browserify
0.1.3

2 months ago

0.0.1

2 months ago