@wjwjq/release-helper 0.2.97 → 0.2.98

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.
@@ -81,7 +81,7 @@ Nginx has been installed, re-install it?[Y/N]n #
81
81
  ...
82
82
  2024-06-28 14:57:39: nginx start command: /usr/sbin/nginx -c /opt/$APP_NAME$/nginx/nginx.conf
83
83
  2024-06-28 14:57:39: $VERSION$ /opt/$APP_NAME$/nginx/nginx.conf replaced successfully!
84
- 2024-06-28 14:57:39: add $APP_NAME$.nginx.service to /usr/lib/systemd/system/
84
+ 2024-06-28 14:57:39: add $APP_NAME$.service to /usr/lib/systemd/system/
85
85
  2024-06-28 14:57:39: /opt/$APP_NAME$/assets/settings
86
86
  2024-06-28 14:57:39: $APP_NAME$ deployed successfully #安装成功
87
87
  ```
@@ -162,7 +162,7 @@ chmod +x upgrade.sh
162
162
  ...
163
163
  2024-06-28 14:57:39: nginx start command: /usr/sbin/nginx -c /opt/$APP_NAME$/nginx/nginx.conf
164
164
  2024-06-28 14:57:39: $VERSION$ /opt/$APP_NAME$/nginx/nginx.conf replaced successfully!
165
- 2024-06-28 14:57:39: add $APP_NAME$.nginx.service to /usr/lib/systemd/system/
165
+ 2024-06-28 14:57:39: add $APP_NAME$.service to /usr/lib/systemd/system/
166
166
  2024-06-28 14:57:39: /opt/$APP_NAME$/assets/settings
167
167
  2024-06-28 14:57:39: $APP_NAME$ deployed successfully #安装成功
168
168
  ```
@@ -185,7 +185,7 @@ chmod +x upgrade.sh
185
185
  | 日志文件位置 | /var/log/$APP_NAME$/nginx.log |
186
186
  | 系统静态资源目录 | /opt/$APP_NAME$/assets/ |
187
187
  | 系统配置文件 | /opt/$APP_NAME$/assets/settings |
188
- | system service位置 | /usr/lib/systemd/system/$APP_NAME$.nginx.service |
188
+ | system service位置 | /usr/lib/systemd/system/$APP_NAME$.service |
189
189
  | 日志翻转配置位置 | /etc/logrotate.d/$APP_NAME$.nginx |
190
190
 
191
191
  ## 4.2 启动命令
@@ -209,7 +209,7 @@ supervisorctl start $APP_NAME$.nginx
209
209
  需安装时选择 -cluster 模式
210
210
 
211
211
  ```bash
212
- systemctl start $APP_NAME$.nginx.service
212
+ systemctl start $APP_NAME$.service
213
213
  ```
214
214
 
215
215
  ## 4.3 验证
@@ -3,7 +3,7 @@ daemon off;
3
3
  user root;
4
4
  worker_processes 2;
5
5
 
6
- #PID_FILE_PALCEHOLDER
6
+ #PID_FILE_PLACEHOLDER
7
7
 
8
8
  # 请勿删除此处占位符
9
9
  #ERROR_LOG_PLACEHOLDER
@@ -257,8 +257,8 @@ start() {
257
257
  chmod 744 -R "$INSTALL_PATH"
258
258
 
259
259
  if [[ $? == 0 ]]; then
260
- log_success "posidon-frontend deployed successfully"
260
+ log_success "${APP_NAME} deployed successfully"
261
261
  else
262
- log_error "posidon-frontend deployment failed"
262
+ log_error "${APP_NAME} deployment failed"
263
263
  fi
264
264
  }
@@ -161,12 +161,12 @@ add_nginx_service() {
161
161
 
162
162
  if ((mode == 2)); then
163
163
  # systemctl enable nginx
164
- cp ./nginx.service /usr/lib/systemd/system/"$APP_NAME".nginx.service
164
+ cp ./nginx.service /usr/lib/systemd/system/"$APP_NAME".service
165
165
  systemctl daemon-reload
166
166
 
167
- log_success "add ${APP_NAME}.nginx.service to /usr/lib/systemd/system/"
167
+ log_success "add ${APP_NAME}.service to /usr/lib/systemd/system/"
168
168
  else
169
- rm -rf /usr/lib/systemd/system/"$APP_NAME".nginx.service
169
+ rm -rf /usr/lib/systemd/system/"$APP_NAME".service
170
170
  fi
171
171
  }
172
172
 
@@ -301,7 +301,8 @@ install_nginx_from_source(){
301
301
  # 安装nginx可执行程序
302
302
  install_nginx_binary() {
303
303
  log "install nginx to path: ${NGINX_BINARY_INSTALL_PATH}"
304
-
304
+ mkdir -p $NGINX_BINARY_INSTALL_PATH
305
+
305
306
  if [[ "${nginx_install_mode}" == "source" ]]; then
306
307
  install_nginx_from_source
307
308
  else
@@ -6,5 +6,5 @@ Install
6
6
  a. 若无 --> 安装
7
7
  b. 若有 --> 询问是否替换安装
8
8
  --> 资源部署
9
- 1. 生成对应 xxx.nginx.conf (替换对应日志xxx.nginx.log、进程和生成 xxx.nginx.service)
9
+ 1. 生成对应 xxx.nginx.conf (替换对应日志xxx.nginx.log、进程和生成 xxx.service)
10
10
  2. 复制静态资源文件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wjwjq/release-helper",
3
- "version": "0.2.97",
3
+ "version": "0.2.98",
4
4
  "description": "generate deployment package for frontend, include nginx...",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",