同步操作将从 腾讯开源/Hippy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Hippy version management follows principle that all modules use same version.
The front-end Uses lerna for versioning and CHANGELOG generation, but cannot use its publishing functionality because it needs to update the terminal package.
Update version and CHANGELOG usage:
npx lerna version [VERSION] --force-publish --conventional-commits --tag-version-prefix='' --no-push
[version]
- The version number to be released, such as 2.1.0.--conventional-commits
- Generates a CHANGELOG based on the conventional commit specification.--tag-version-prefix
- it is changed to a null character, so that the generated version number tag is not preceded by the default v
--no-push
- it does not push tags to remote.After Lerna generates the version number and CHANGELOG, it needs to roll back the version, and all the published changes need to be merged into a commit.
git reset --soft HEAD^
Delete the tag at the same time, after a while update need to regenerate the tag
git tag -d [VERSION]
The native version number is mainly located in the following files, which need to be updated to the version number to be released
iOS
Android
修改安卓的abi配置,支持armeabi-v7a和arm64-v8a
INCLUDE_ABI_ARMEABI_V7A=true
INCLUDE_ABI_ARM64_V8A=true
The new front-end SDK is then compiled with
npm run build
If some code updated under core/js
, you need to compile the core code with
npm run buildcore
Then update the dependencies under the target examples
and update the built-in packages of the native. Generally speaking, the built-in hippy-react-demo is the default, but be sure to check that hippy-vue-demo functions properly.
npm run buildexample hippy-react-demo
Check again that all files have been modified correctly
git status
Submit document modification
git add [FILES]
Enter a commit message that conforms to Convention Commit specifications
git commit -m 'chore(release): released [VERSION]'
tag (如果是大版本, 在主干打tag, 如果是hotfix,在hotfix分支打tag,然后把changelog合回主干)
git tag -a [VERSION] -m "version release xxx"
Commit the code and prepare to publish the PR merge into the master branch.
git push origin branch # 提交代码
git push origin tag # 提交 tag
Front End Publishing to npmjs.com
npx lerna exec "npm publish"
If npm secondary authentication is active, you will be asked to input a one-time password.
iOS published to CocoaPods.org
pod trunk register [EMAIL] [NAME]
pod trunk push hippy.podspec
If the parameter check fails when publishing, you can prefix the
pod
commandCOCOAPODS_VALIDATOR_SKIP_XCODEBUILD=1
parameter
Android released to Maven Central, the original jCenter repository has been abandoned version query.
Follow the steps for publishing Maven Central and sign up for sonatype.
Increase the system environment variable configuration
SIGNING_KEY_ID=gpg公钥key后8位
SIGNING_PASSWORD=gpg密钥对密码
SIGNING_SECRET_KEY_RING_FILE=gpg文件存放路径, 如/Users/user/.gnupg/secring.gpg
OSSRH_USERNAME=sonatype账号
OSSRH_PASSWORD=sonatype密码
Run build Clean Project
Android gradle.properties
turns on the #PUBLISH_ARTIFACT_ID=hippy-debug
comment, and the Gradle Task executes other
=> assembleDebug
before publishing
=> publish
Android gradle.properties
turns on the #PUBLISH_ARTIFACT_ID=hippy-common
comment, and the Gradle Task executes other
=> assembleRelease
before publishing
=> publish
After the success of the release of the SDK will be in the staging
state of Sonatype, in the left side Staging Repositories
of the Sonatype Staging Repositories to find just released repository, if you want to test before Release, can be under the Content
will aar
download, replace examples
=> android-demo
=> example
=> libs
under the aar(name to android-sdk-release.aar
)
// annotation local reference in `setting.gradle`
// include 'android-sdk'
// project(':android-sdk').projectDir = new File('../../ android/sdk')
--------------
// `android-demo` => `example` => `build.gradle` dependencies can be changed as follow to use local aar file
if (1) {
api (name: 'android-sdk-release', ext: 'aar')
} else {
api project(path: ':android-sdk')
}
After successful verification, Close the repository of Staging Repositories``Close
and click Release
.
After the success of the Release can be searched in the Repository to the corresponding version of aar, Maven home page need to wait for more than 2 hours to synchronize
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。