dashboard-shell-shell 3.0.5-test.44 → 3.0.5-test.45

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.
@@ -168,7 +168,7 @@ export default {
168
168
  text-transform: uppercase;
169
169
 
170
170
  .custom-color-decoration {
171
- height: 4px;
171
+ height: 0px;
172
172
  width: 100%;
173
173
  margin: 0 auto;
174
174
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashboard-shell-shell",
3
- "version": "3.0.5-test.44",
3
+ "version": "3.0.5-test.45",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -2,7 +2,6 @@
2
2
 
3
3
  SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
4
4
  BASE_DIR="$( cd $SCRIPT_DIR && cd ../.. & pwd)"
5
- SHELL_DIR=$BASE_DIR/shell/
6
5
  EXIT_CODE=0
7
6
  FORMATS="umd-min"
8
7
 
@@ -19,12 +18,18 @@ done
19
18
 
20
19
  shift $((OPTIND-1))
21
20
 
22
- # Use shell folder in node modules when we have @rancher/shell installed as a node module
23
- # rather than the use-case of the mono-repo with the shell folder at the top-level
24
- if [ ! -d ${SHELL_DIR} ]; then
25
- SHELL_DIR=$BASE_DIR/node_modules/@rancher/shell/
26
- SHELL_DIR=$(cd -P ${SHELL_DIR} && pwd)
21
+ # ---- 修改这里 ----
22
+ # 优先使用顶级 shell 文件夹,如果不存在则使用 node_modules/dashboard-shell-shell
23
+ SHELL_DIR=$BASE_DIR/shell/
24
+ if [ ! -d "${SHELL_DIR}" ]; then
25
+ SHELL_DIR=$BASE_DIR/node_modules/dashboard-shell-shell/
26
+ if [ ! -d "${SHELL_DIR}" ]; then
27
+ echo "Error: dashboard-shell-shell not found in node_modules"
28
+ exit 1
29
+ fi
27
30
  fi
31
+ # 转为绝对路径,防止符号链接循环
32
+ SHELL_DIR=$(cd -P "${SHELL_DIR}" && pwd)
28
33
 
29
34
  CREATE_TARBALL=${2}
30
35
 
@@ -46,18 +51,14 @@ if [ -d "${BASE_DIR}/pkg/${1}" ]; then
46
51
 
47
52
  pushd pkg/${1}
48
53
 
49
- # Check that the .shell link exists and points to the correct place
50
- if [ -e ".shell" ]; then
51
- LINK=$(readlink .shell)
52
- if [ "${LINK}" != "${SHELL_DIR}" ]; then
53
- echo ".shell symlink exists but does not point to expected location - please check and fix"
54
- popd
55
- exit -1
56
- fi
57
- else
58
- ln -s ${SHELL_DIR} .shell
54
+ # 删除旧的 .shell,防止循环
55
+ if [ -L ".shell" ] || [ -e ".shell" ]; then
56
+ rm -rf .shell
59
57
  fi
60
58
 
59
+ # 创建新的符号链接
60
+ ln -s "${SHELL_DIR}" .shell
61
+
61
62
  FILE=index.js
62
63
  if [ -f ./index.ts ]; then
63
64
  FILE=index.ts
@@ -72,7 +73,7 @@ if [ -d "${BASE_DIR}/pkg/${1}" ]; then
72
73
  cp -f ./package.json ${PKG_DIST}/package.json
73
74
  node ${SCRIPT_DIR}/pkgfile.js ${PKG_DIST}/package.json
74
75
  rm -rf ${PKG_DIST}/*.bak
75
- rm .shell
76
+ rm -rf .shell
76
77
 
77
78
  popd
78
79
  fi
@@ -81,22 +82,16 @@ if [ $EXIT_CODE -ne 0 ]; then
81
82
  exit $EXIT_CODE
82
83
  fi
83
84
 
84
-
85
85
  if [ -n "${CREATE_TARBALL}" ]; then
86
86
  echo $COMMIT $COMMIT_BRANCH > ${PKG_DIST}/version-commit.txt
87
87
 
88
88
  TARBALL=${NAME}.tar.gz
89
89
 
90
90
  pushd ${PKG_DIST}
91
-
92
91
  rm -f ../$TARBALL
93
-
94
92
  echo "Compressing to ${TARBALL}..."
95
-
96
93
  tar -czf ../${TARBALL} .
97
-
98
94
  popd
99
-
100
95
  fi
101
96
 
102
97
  exit $EXIT_CODE
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  # 执行命令示例:
4
- # TAG=shell-pkg-v3.0.5-test.44 ./shell/scripts/publish-shell.sh
4
+ # TAG=shell-pkg-v3.0.5-test.45 ./shell/scripts/publish-shell.sh
5
5
 
6
6
  set -euo pipefail
7
7