create-entity-server 0.5.3 → 0.5.4

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": "create-entity-server",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Create a new entity-server project in one command — like create-react-app or create-vite.",
5
5
  "keywords": [
6
6
  "entity-server",
@@ -76,6 +76,7 @@ ARCH="$(uname -m)"
76
76
  case "$OS" in
77
77
  Linux) PLATFORM="linux" ;;
78
78
  Darwin) PLATFORM="darwin" ;;
79
+ MINGW*|MSYS*|CYGWIN*) PLATFORM="windows" ;;
79
80
  *)
80
81
  echo "❌ 지원하지 않는 OS: $OS"
81
82
  echo " Windows 는 scripts\\update-server.ps1 을 사용하세요."
@@ -92,15 +93,28 @@ case "$ARCH" in
92
93
  ;;
93
94
  esac
94
95
 
96
+ BIN_EXT=""
97
+ INSTALL_BIN_EXT=""
98
+ if [ "$PLATFORM" = "windows" ]; then
99
+ BIN_EXT=".exe"
100
+ INSTALL_BIN_EXT=".exe"
101
+ fi
102
+
95
103
  # ── 현재 버전 확인 ────────────────────────────────────────────────────────────
96
104
 
97
105
  _current_ver() {
98
- local bin="$PROJECT_ROOT/bin/entity-server"
106
+ local bin="$PROJECT_ROOT/bin/entity-server${INSTALL_BIN_EXT}"
99
107
  local ver=""
100
- if [ ! -x "$bin" ] && [ -x "$PROJECT_ROOT/entity-server" ]; then
108
+ if [ ! -f "$bin" ] && [ -f "$PROJECT_ROOT/bin/entity-server" ]; then
109
+ bin="$PROJECT_ROOT/bin/entity-server"
110
+ fi
111
+ if [ ! -f "$bin" ] && [ -f "$PROJECT_ROOT/entity-server${INSTALL_BIN_EXT}" ]; then
112
+ bin="$PROJECT_ROOT/entity-server${INSTALL_BIN_EXT}"
113
+ fi
114
+ if [ ! -f "$bin" ] && [ -f "$PROJECT_ROOT/entity-server" ]; then
101
115
  bin="$PROJECT_ROOT/entity-server"
102
116
  fi
103
- if [ -x "$bin" ]; then
117
+ if [ -f "$bin" ]; then
104
118
  ver=$("$bin" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)
105
119
  if [ -z "$ver" ]; then
106
120
  ver=$("$bin" version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)
@@ -229,9 +243,9 @@ _install() {
229
243
  mkdir -p "$PROJECT_ROOT/bin"
230
244
 
231
245
  for BIN in "${BINARIES[@]}"; do
232
- local file="${BIN}-${PLATFORM}-${ARCH_TAG}"
246
+ local file="${BIN}-${PLATFORM}-${ARCH_TAG}${BIN_EXT}"
233
247
  local url="https://github.com/${REPO}/releases/download/v${target_ver}/${file}"
234
- local dest="$PROJECT_ROOT/bin/$BIN"
248
+ local dest="$PROJECT_ROOT/bin/${BIN}${INSTALL_BIN_EXT}"
235
249
 
236
250
  printf " ↓ %-32s" "$file"
237
251
  if _download "$url" "$dest" 2>/dev/null; then