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] --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 defaultv
--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
- hippy.podspec [s.version]
- HippyBridge.mm [_HippySDKVersion]
Android
- gradle.properties [VERSION_NAME]
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
git tag [VERSION]
Commit the code and tag.
git push origin vxxx - branch
git push origin [VERSION] - tag
Run Release Workflow to publish all packages.
- sign up for sonatype.
- After successful verification, Close the repository of
Staging Repositories
through clickingClose
and then clickRelease
to release hippy maven packages. - 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