Commit 897324901e695df18a827aa68af8bae00010655f
1 parent
6b0cf9d1
chore: update luban-h5.sh for migrations
Showing
3 changed files
with
61 additions
and
3 deletions
docs/en/migration-guide/migration-guide-1.8.1-to-1.8.2.md
0 → 100644
| 1 | +# Migration guide from v.1.8.1 to v.1.8.2 | |
| 2 | +Upgrading your Luban-H5 application to `v.1.8.2`. | |
| 3 | + | |
| 4 | +the patch changes are [here(v1.8.2 release log)](https://github.com/ly525/luban-h5/releases/tag/v1.8.2) | |
| 5 | + | |
| 6 | + | |
| 7 | +To upgrade a project to the `v.1.8.2` version of Luban-H5 follow the instructions below. | |
| 8 | + | |
| 9 | +```bash | |
| 10 | +# pull the latest code | |
| 11 | +# rebuild the preview module | |
| 12 | +./luban-h5 rebuild_engine | |
| 13 | +``` | |
| 14 | + | |
| 15 | +feel free open an [issue](https://github.com/ly525/luban-h5/issues) if you have questions about this. | |
| 0 | 16 | \ No newline at end of file | ... | ... |
docs/zh/migration-guide/migration-guide-1.8.1-to-1.8.2.md
0 → 100644
| 1 | +# 鲁班H5 v.1.8.1至 v.1.8.2 迁移指南 | |
| 2 | +升级`鲁班H5`版本至 `v.1.8.2`. | |
| 3 | + | |
| 4 | +主要修改请参见[v1.8.2 release log](https://github.com/ly525/luban-h5/releases/tag/v1.8.2) | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | +将 鲁班H5 升级到`v.1.8.2` 比较简单,只要执行如下命令即可: | |
| 9 | + | |
| 10 | +```bash | |
| 11 | +# pull 最新代码 | |
| 12 | +# 重新编译预览模块即可 | |
| 13 | +./luban-h5 rebuild_engine | |
| 14 | +``` | |
| 15 | + | |
| 16 | +如果有疑问,提 [issue](https://github.com/ly525/luban-h5/issues) 即可 | |
| 0 | 17 | \ No newline at end of file | ... | ... |
luban-h5.sh
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | # @Author: ly525 |
| 5 | 5 | # @Date: 2020-01-10 22:23:34 |
| 6 | 6 | # @LastEditors : ly525 |
| 7 | - # @LastEditTime : 2020-01-12 16:21:22 | |
| 7 | + # @LastEditTime : 2020-01-24 22:02:16 | |
| 8 | 8 | # @FilePath: /luban-h5/luban-h5.sh |
| 9 | 9 | # @Github: https://github.com/ly525/luban-h5 |
| 10 | 10 | # @Description: Do not edit |
| ... | ... | @@ -22,7 +22,7 @@ cat << EOT |
| 22 | 22 | --------------------------------------------------------------------------- |
| 23 | 23 | |
| 24 | 24 | Usage: |
| 25 | - $(basename $0) [--help|-h] [version|clean|init|start|restart|stop] | |
| 25 | + $(basename $0) [--help|-h] [version|clean|init|start|restart|stop|rebuild_fe|rebuild_engine|rebuild_editor] | |
| 26 | 26 | |
| 27 | 27 | help Show usage. |
| 28 | 28 | version Show version. |
| ... | ... | @@ -39,6 +39,18 @@ Usage: |
| 39 | 39 | restart #!en Restart the luban-h5 service. |
| 40 | 40 | #!zh 重启luban-h5 |
| 41 | 41 | |
| 42 | + rebuild_fe | |
| 43 | + #!en rebuild the front-end modules(editor and preview engine). | |
| 44 | + #!zh 重新编译编辑器模块和渲染模块 | |
| 45 | + | |
| 46 | + rebuild_engine | |
| 47 | + #!en rebuild the preview engine. | |
| 48 | + #!zh 重新编译渲染模块 | |
| 49 | + | |
| 50 | + rebuild_editor | |
| 51 | + #!en rebuild the editor. | |
| 52 | + #!zh 重新编译编辑器 | |
| 53 | + | |
| 42 | 54 | stop #!em Build binary packages only. |
| 43 | 55 | #!zh 停止luban-h5 |
| 44 | 56 | |
| ... | ... | @@ -98,6 +110,21 @@ luban_h5_restart() { |
| 98 | 110 | cd ${cur_dir} |
| 99 | 111 | } |
| 100 | 112 | |
| 113 | +luban_h5_rebuild_fe() { | |
| 114 | + cd front-end/h5 && yarn && yarn build | |
| 115 | + cd ${cur_dir} | |
| 116 | +} | |
| 117 | + | |
| 118 | +luban_h5_rebuild_engine() { | |
| 119 | + cd front-end/h5 && yarn && yarn build:engine | |
| 120 | + cd ${cur_dir} | |
| 121 | +} | |
| 122 | + | |
| 123 | +luban_h5_rebuild_editor() { | |
| 124 | + cd front-end/h5 && yarn && yarn build:editor | |
| 125 | + cd ${cur_dir} | |
| 126 | +} | |
| 127 | + | |
| 101 | 128 | luban_h5_stop() { |
| 102 | 129 | cd back-end/h5-api && npx pm2 stop luban-h5-service |
| 103 | 130 | cd ${cur_dir} |
| ... | ... | @@ -108,7 +135,7 @@ luban_h5_stop() { |
| 108 | 135 | # Initialization step |
| 109 | 136 | action=$1 |
| 110 | 137 | case "$action" in |
| 111 | - version|clean|init|start|restart|stop) | |
| 138 | + version|clean|init|start|restart|stop|rebuild_fe|rebuild_engine|rebuild_editor) | |
| 112 | 139 | luban_h5_${action} |
| 113 | 140 | ;; |
| 114 | 141 | *) | ... | ... |