gitcode-cli 0.14.1__py3-none-any.whl → 0.15.0__py3-none-any.whl

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.
gc_cli/__init__.py CHANGED
@@ -4,7 +4,7 @@ GitCode CLI - Command line tool for GitCode.
4
4
  This package provides a Python wrapper for the gc binary.
5
5
  """
6
6
 
7
- __version__ = "0.14.1"
7
+ __version__ = "0.15.0"
8
8
  __author__ = "GitCode CLI Contributors"
9
9
  __all__ = ["__version__", "main"]
10
10
 
Binary file
Binary file
gc_cli/bin/gc-linux-amd64 CHANGED
Binary file
gc_cli/bin/gc-linux-arm64 CHANGED
Binary file
Binary file
gc_cli/wrapper.py CHANGED
@@ -77,6 +77,18 @@ def ensure_executable(binary_path: Path) -> None:
77
77
  binary_path.chmod(0o755)
78
78
 
79
79
 
80
+ def detect_distribution() -> str:
81
+ """Report the installation channel for the distribution env.
82
+
83
+ uv-managed tools run from .../uv/tools/<name>/... venvs; reporting "uv"
84
+ (instead of the blanket "pypi") makes `gc update` suggest
85
+ "uv tool upgrade" rather than running pip inside the uv-managed
86
+ environment — which is exactly what uv tells users not to do.
87
+ """
88
+ prefix = str(Path(sys.prefix).resolve()).replace("\\", "/").lower()
89
+ return "uv" if "/uv/tools/" in prefix else "pypi"
90
+
91
+
80
92
  def main() -> int:
81
93
  """Main entry point for the GitCode CLI command."""
82
94
  try:
@@ -85,7 +97,7 @@ def main() -> int:
85
97
  ensure_executable(binary_path)
86
98
  env = os.environ.copy()
87
99
  env.setdefault(COMMAND_NAME_ENV, get_command_name())
88
- env.setdefault(DISTRIBUTION_ENV, "pypi")
100
+ env.setdefault(DISTRIBUTION_ENV, detect_distribution())
89
101
  env.setdefault(ENTRYPOINT_ENV, str(Path(sys.argv[0]).resolve()))
90
102
  env.setdefault(BINARY_ENV, str(binary_path.resolve()))
91
103
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitcode-cli
3
- Version: 0.14.1
3
+ Version: 0.15.0
4
4
  Summary: GitCode CLI - Command line tool for GitCode
5
5
  Author-email: GitCode CLI Contributors <support@gitcode.com>
6
6
  Maintainer-email: GitCode CLI Contributors <support@gitcode.com>
@@ -91,10 +91,10 @@ npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@lat
91
91
  CI、审计或版本复现可固定版本:
92
92
 
93
93
  ```bash
94
- npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.14.1 install
94
+ npx --yes --ignore-scripts --registry=https://registry.npmjs.org atomgit-cli@0.15.0 install
95
95
  ```
96
96
 
97
- (scoped 坐标锁定形式:`npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.14.1 install`)
97
+ (scoped 坐标锁定形式:`npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.15.0 install`)
98
98
 
99
99
  不要使用 `npm i atomgit-cli` 或 `npm install atomgit-cli` 安装全局 CLI;这两条命令只会把包加入当前项目的 `node_modules`,不会更新 PATH 中已有的 `gitcode`。需要由 npm global prefix 管理入口时,可改用:
100
100
 
@@ -149,10 +149,10 @@ export PATH="$HOME/.local/bin:$PATH"
149
149
 
150
150
  ```bash
151
151
  # 从 Releases 下载 .deb 包
152
- wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.14.1/gc_0.14.1_amd64.deb
152
+ wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gc_0.15.0_amd64.deb
153
153
 
154
154
  # 安装
155
- sudo dpkg -i gc_0.14.1_amd64.deb
155
+ sudo dpkg -i gc_0.15.0_amd64.deb
156
156
  ```
157
157
 
158
158
  DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
@@ -161,10 +161,10 @@ DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
161
161
 
162
162
  ```bash
163
163
  # 从 Releases 下载 .rpm 包
164
- wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.14.1/gc-0.14.1-1.x86_64.rpm
164
+ wget https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gc-0.15.0-1.x86_64.rpm
165
165
 
166
166
  # 安装
167
- sudo rpm -i gc-0.14.1-1.x86_64.rpm
167
+ sudo rpm -i gc-0.15.0-1.x86_64.rpm
168
168
  ```
169
169
 
170
170
  DEB/RPM packages install both `gc` and `gitcode`; on Linux they are equivalent.
@@ -180,7 +180,7 @@ source .venv/bin/activate # Linux/macOS
180
180
  # .\.venv\Scripts\Activate.ps1 # Windows PowerShell
181
181
 
182
182
  # 安装(一行命令)
183
- pip install https://gitcode.com/atomgit-cli/cli/releases/download/v0.14.1/gitcode_cli-0.14.1-py3-none-any.whl
183
+ pip install https://gitcode.com/atomgit-cli/cli/releases/download/v0.15.0/gitcode_cli-0.15.0-py3-none-any.whl
184
184
 
185
185
  # Windows PowerShell 中推荐使用 gitcode,避免 gc 被内置 Get-Content 别名覆盖
186
186
  gitcode version
@@ -210,7 +210,7 @@ source .venv/bin/activate # Linux/macOS
210
210
  # .\.venv\Scripts\Activate.ps1 # Windows PowerShell
211
211
 
212
212
  # 固定版本安装,避免 PyPI 尚未同步时安装旧版本
213
- python -m pip install -i https://pypi.org/simple/ gitcode-cli==0.14.1
213
+ python -m pip install -i https://pypi.org/simple/ gitcode-cli==0.15.0
214
214
 
215
215
  # Windows PowerShell 中推荐使用 gitcode
216
216
  gitcode version
@@ -277,7 +277,7 @@ brew upgrade gc
277
277
  ```
278
278
 
279
279
  shell 补全(bash/zsh/fish)随安装自动配置,无需额外操作。
280
- Homebrew 同时提供 `gc` 与 `gitcode`;升级后可运行 `gitcode doctor install` 检查是否仍被 pip/npm 旧入口遮蔽。
280
+ Homebrew 同时提供 `gc` 与 `gitcode`;升级后可运行 `gitcode doctor install` 检查是否仍被 pip/npm 旧入口遮蔽。渠道检测会先解析 `gc`/`gitcode` 的软链再匹配 Homebrew 布局(Apple Silicon `/opt/homebrew`、Intel Mac `/usr/local`、Linuxbrew `/home/linuxbrew/.linuxbrew`),bin 目录软链与 Cellar 实路径均可识别。
281
281
 
282
282
  ### npm 更新与 PATH 诊断
283
283
 
@@ -0,0 +1,15 @@
1
+ gc_cli/__init__.py,sha256=HGyTRatpK4aGLoL_aCUdGv8AgbGk64GF0NZzEeGxrRc,243
2
+ gc_cli/__main__.py,sha256=fqZ9iOh0ac8K_B9WmHydaxokzIivd5QBPJoNqgXnugo,154
3
+ gc_cli/wrapper.py,sha256=Ka7itE4b4dHYN7oTFa5KvqI8w7WFWlnTLNw8Iu3dZcM,3680
4
+ gc_cli/bin/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ gc_cli/bin/gc-darwin-amd64,sha256=yp9TZA_yiy8kqhOz5kCoq14OIRPIgZEglm3ROa-F8v8,10362848
6
+ gc_cli/bin/gc-darwin-arm64,sha256=idBDD0TRjm3ZVG0QO6tstrJQkIVzTJBXRR9bF1tzrdI,9953346
7
+ gc_cli/bin/gc-linux-amd64,sha256=7r8psO7JpzMmG-KFiYHQ4-RSPdR4kZpYwrfjEfBhgcI,9433240
8
+ gc_cli/bin/gc-linux-arm64,sha256=bE85LaDHqSBWQ-Oa5IuaAc0TqlvxbSDBQAlnuAgCVvU,8978584
9
+ gc_cli/bin/gc-windows-amd64.exe,sha256=WT3TUbZyqL2uiWDZsK-Zcic-u3WRXQi3FceKlADHifc,9808896
10
+ gitcode_cli-0.15.0.dist-info/licenses/LICENSE,sha256=dViNRlgMSkfn1udYjx-DEm8D6e182mc47gnLUMNjI24,1254
11
+ gitcode_cli-0.15.0.dist-info/METADATA,sha256=AWq2XG-s0_HaeGr2QWvOZUUgZiQQ3dbLNDDxjE1_aqI,20225
12
+ gitcode_cli-0.15.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
+ gitcode_cli-0.15.0.dist-info/entry_points.txt,sha256=DresfT5jkpwU3fPn8n0MTao1m5QZi3XEulKFbQ8BYYY,73
14
+ gitcode_cli-0.15.0.dist-info/top_level.txt,sha256=2fSmR3kQ-XhdgFQdVvWmZcEyERJKVZVxOhk7tna1Sus,7
15
+ gitcode_cli-0.15.0.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- gc_cli/__init__.py,sha256=31zet5Jz7KZekPwpVa9DPB1YBrorHz48-rZI9easYt8,243
2
- gc_cli/__main__.py,sha256=fqZ9iOh0ac8K_B9WmHydaxokzIivd5QBPJoNqgXnugo,154
3
- gc_cli/wrapper.py,sha256=Q_NathDiUKF5C4D-TEQd5Ky_y2GN88pqS2IybKKOkRs,3155
4
- gc_cli/bin/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- gc_cli/bin/gc-darwin-amd64,sha256=9CIU_J9S59ckaEle1BogDcXzWv7fISVUkVZQwTIJSCA,10314832
6
- gc_cli/bin/gc-darwin-arm64,sha256=RdF5hnL57k-7nMcLaXMWrsT4xabCEh3sA6OT3vGGxKM,9933842
7
- gc_cli/bin/gc-linux-amd64,sha256=0pf9t1VDPb7pIX3Wc1u80pWr2CRO2t1ZoEp9LmEKoyo,9384088
8
- gc_cli/bin/gc-linux-arm64,sha256=gt-TKxjWoWtSqGUC_a8cavvhqNWXjmuuFtiGW-gBuZQ,8978584
9
- gc_cli/bin/gc-windows-amd64.exe,sha256=ePa0vW_koLaGexvfnrPU07ZX5GftL5jd1MGcNvWRpS0,9764864
10
- gitcode_cli-0.14.1.dist-info/licenses/LICENSE,sha256=dViNRlgMSkfn1udYjx-DEm8D6e182mc47gnLUMNjI24,1254
11
- gitcode_cli-0.14.1.dist-info/METADATA,sha256=MFx3thsMBFsVEGvHCAk28tnEUHGthFUA3jWRK5L925s,19996
12
- gitcode_cli-0.14.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- gitcode_cli-0.14.1.dist-info/entry_points.txt,sha256=DresfT5jkpwU3fPn8n0MTao1m5QZi3XEulKFbQ8BYYY,73
14
- gitcode_cli-0.14.1.dist-info/top_level.txt,sha256=2fSmR3kQ-XhdgFQdVvWmZcEyERJKVZVxOhk7tna1Sus,7
15
- gitcode_cli-0.14.1.dist-info/RECORD,,