Explorar el Código

update README.md

reghao hace 1 año
padre
commit
4af56c3189
Se han modificado 3 ficheros con 35 adiciones y 22 borrados
  1. 13 10
      README.md
  2. 12 8
      zzz/build_image.sh
  3. 10 4
      zzz/build_jar.sh

+ 13 - 10
README.md

@@ -39,17 +39,20 @@ oss-console 和 oss-store 之间的关系如下图所示:
 - 3.然后可以开始构建和部署系统
 
 ## 构建
-### 构建 jar 包
-- 1.使用 cd 命令切换到 oss/zzz 目录
-- 2.执行 build_jar.sh 脚本
-> 需要自行设置 proj_dir 变量的值
-- 3.构建完成后, 生成的 jar 包会存放在 oss/oss-store/bin 目录中
+根据需要构建的类型使用 wget 获取构建脚本:
+```
+# 构建 jar 包使用此脚本
+wget https://git.reghao.cn/reghao/oss/raw/master/zzz/build_jar.sh
 
-### 构建 docker 镜像
-- 1.使用 cd 命令切换到 oss/zzz 目录
-- 2.执行 build_image.sh 脚本
-> 需要自行设置 proj_dir 变量的值
-- 3.构建完成后, 使用 docker images | grep 'oss-store' 命令查看生成的镜像
+# 构建 docker 镜像使用此脚本
+wget https://git.reghao.cn/reghao/oss/raw/master/zzz/build_image.sh
+```
+- 1.修改构建脚本中的 base_dir 变量的值
+- 2.执行构建脚本
+- 3.构建完成
+> 如果使用 build_jar.sh 脚本构建, 生成的 jar 包会存放在 oss/oss-store/bin 目录中
+>
+> 如果使用 build_image.sh 脚本构建, 生成的镜像则使用 docker images | grep 'oss-store' 命令查看
 
 ## 部署
 oss-store 应用强依赖 oss-console, 必须先启动 oss-console 后再启动 oss-store

+ 12 - 8
zzz/build_image.sh

@@ -6,18 +6,22 @@
 
 set -e
 
+# 代码存放的位置
+base_dir = '/home/reghao/Downloads'
+
+###############################################################################
+# 构建依赖
+###############################################################################
 git clone https://git.reghao.cn/reghao/jutil
 cd jutil
 mvn install package -Dmaven.test.skip=true
 
-proj_dir = '/a/b/c/oss'
-cd ${proj_dir}
-commit_id=`git rev-parse HEAD | cut -c 1-8`
-docker_prefix='reghao/oss-store'
-
-mvn clean install -Dmaven.test.skip=true -am -pl oss-api
-mvn clean install -Dmaven.test.skip=true -am -pl oss-sdk
+###############################################################################
+# 构建 oss-store 应用
+###############################################################################
+cd ${base_dir}
 mvn clean package -Dmaven.test.skip=true -am -pl oss-store -Ptest
 
-cd ${proj_dir}/oss-store
+commit_id=`git rev-parse HEAD | cut -c 1-8`
+docker_prefix='reghao/oss-store'
 docker build -t ${docker_prefix}:${commit_id} .

+ 10 - 4
zzz/build_jar.sh

@@ -6,12 +6,18 @@
 
 set -e
 
+# 代码存放的位置
+base_dir = '/home/reghao/Downloads'
+
+###############################################################################
+# 构建依赖
+###############################################################################
 git clone https://git.reghao.cn/reghao/jutil
 cd jutil
 mvn install package -Dmaven.test.skip=true
 
-proj_dir = '/a/b/c/oss'
-cd ${proj_dir}
-mvn clean install -Dmaven.test.skip=true -am -pl oss-api
-mvn clean install -Dmaven.test.skip=true -am -pl oss-sdk
+###############################################################################
+# 构建 oss-store 应用
+###############################################################################
+cd ${base_dir}
 mvn clean package -Dmaven.test.skip=true -am -pl oss-store -Ptest