@winner-fed/winner-deploy 3.1.2 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winner-fed/winner-deploy",
3
- "version": "3.1.2",
3
+ "version": "3.2.0",
4
4
  "description": "Generate a publication deployed by the See platform",
5
5
  "keywords": [
6
6
  "winner",
@@ -87,8 +87,6 @@ exports.genSeePackage = function genSeePackage (seePackageName, options, handler
87
87
  }))
88
88
  }
89
89
 
90
-
91
-
92
90
  if (handler) {
93
91
  handler((cb) => {
94
92
  genZipPackage(seePackageName, tmp, () => {
@@ -157,7 +157,8 @@ exports.generateSeePackageZip = function generateSeePackageZip ({
157
157
  configName,
158
158
  template: (templateFunc)(),
159
159
  variables: (variablesFunc)(),
160
- description
160
+ description,
161
+ scriptsType
161
162
  },
162
163
  done => {
163
164
  if (scriptsType === 'python') {
@@ -4,9 +4,10 @@
4
4
  # 拷贝前端工程文件到运行目录
5
5
  if [ "{{type}}" = "subsystem" ]; then
6
6
  # 子系统执行逻辑
7
- # 程序执行的当前路径,除了tmp文件夹,别的都删除,然后将 tmp/source 的所有文件及文件夹都拷贝到 workspace 目录下
8
- ls -I tmp | xargs rm -rf
9
- \cp -rf tmp/source/* ${workspace}/../
7
+ # 程序执行的当前路径,删除 ${workspace}/{{name}},然后将 tmp/source 的所有文件及文件夹都拷贝到 workspace 目录下
8
+ # ls -I tmp | xargs
9
+ rm -rf ${workspace}/{{name}}
10
+ \cp -rf tmp/source/* ${workspace}/
10
11
  else
11
12
  # 主系统执行逻辑
12
13
  if [ -d "${workspace}/{{name}}" ]; then
@@ -4,7 +4,7 @@
4
4
  if [ "{{type}}" = "subsystem" ]; then
5
5
  # 子系统执行逻辑
6
6
  if [ -d "${workspace}" ]; then
7
- rm -rf ${workspace}
7
+ rm -rf ${workspace}/{{name}}
8
8
  fi
9
9
  else
10
10
  # 主系统执行逻辑
@@ -1,12 +1,11 @@
1
1
  # Dockerfile用于生成应用镜像,非特殊情况请勿修改
2
2
  FROM package.hundsun.com/public-docker-local/freestyle/hswealth/nginx:1.18.0-alpine-see
3
+
4
+ # 使用 WORKDIR 指令可以来指定工作目录(或者称为当前目录),以后各层的当前目录就被改为指定的目录,如该目录不存在, WORKDIR 会帮你建立目录
5
+ WORKDIR ${name}
3
6
  <% if (type === 'bizframe') { %>
4
- COPY dist /usr/share/nginx/html/${ name }
7
+ COPY html "./"
5
8
  <% } else { %>
6
- COPY dist /usr/share/nginx/html/hui-pro
9
+ COPY html/${name} "./"
7
10
  <% } %>
8
- RUN chmod +x /etc/nginx/* && \
9
- chmod +x /usr/share/nginx/html/* &&\
10
- chmod +x /usr/local/bin/*
11
-
12
- WORKDIR /usr/share/nginx/html
11
+ RUN chmod -R a+x "./"