fix: remove v prefix from git tag references in install URLs; update versions.json

This commit is contained in:
Research Assistant 2026-05-25 11:45:11 +08:00
parent d8b897d893
commit 424164f967
5 changed files with 10 additions and 6 deletions

View file

@ -92,7 +92,7 @@ export default class PaperForgePlugin extends Plugin {
const { path: pythonExe, extraArgs = [] } = resolvePythonExecutable(vp, this.settings, undefined, undefined);
const ver = this.manifest.version;
const pypiPkg = `paperforge==${ver}`;
const gitUrl = `git+https://github.com/LLLin000/PaperForge.git@v${ver}`;
const gitUrl = `git+https://github.com/LLLin000/PaperForge.git@${ver}`;
const doInstall = (pkg: string, onDone: (ok: boolean) => void) => {
const child = spawn(pythonExe, [...extraArgs, '-m', 'pip', 'install', '--upgrade', pkg], { cwd: vp, timeout: 120000, env: paperforgeEnrichedEnv() });

View file

@ -148,10 +148,10 @@ export function classifyError(errorCode: string): ErrorClassification {
export function buildRuntimeInstallCommand(pythonExe: string, version: string, extraArgs: string[]): InstallCommand {
if (extraArgs === undefined) extraArgs = [];
const pypiPkg = `paperforge==${version}`;
const gitUrl = `git+https://github.com/LLLin000/PaperForge.git@v${version}`;
const gitUrl = `git+https://github.com/LLLin000/PaperForge.git@${version}`;
const pypiArgs = [...extraArgs, "-m", "pip", "install", "--upgrade", pypiPkg];
const gitArgs = [...extraArgs, "-m", "pip", "install", "--upgrade", gitUrl];
return { cmd: pythonExe, url: gitUrl.replace('@v', '@'), args: gitArgs, pypiArgs, gitArgs, timeout: 120000 };
return { cmd: pythonExe, url: gitUrl, args: gitArgs, pypiArgs, gitArgs, timeout: 120000 };
}
export function parseRuntimeStatus(err: any, stdout: any, stderr: any): RuntimeStatus {

View file

@ -11,5 +11,9 @@
"1.5.5": "1.9.0",
"1.5.6": "1.9.0",
"1.5.7": "1.9.0",
"1.5.8": "1.9.0"
"1.5.8": "1.9.0",
"1.5.9": "1.9.0",
"1.5.10": "1.9.0",
"1.5.11": "1.9.0",
"1.5.12": "1.9.0"
}

View file

@ -52,7 +52,7 @@ class RuntimeInstaller:
self._log("Installing PaperForge...")
if self.version:
tag = self.version if self.version.startswith("v") else f"v{self.version}"
tag = self.version.removeprefix("v") if self.version else self.version
pypi_spec = f"paperforge=={self.version}"
git_spec = f"git+https://github.com/LLLin000/PaperForge.git@{tag}"
else:

View file

@ -776,7 +776,7 @@ def headless_setup(
from paperforge import __version__ as _pv
install_target = [f"paperforge=={_pv}"]
git_target = [f"git+https://github.com/LLLin000/PaperForge.git@v{_pv}"]
git_target = [f"git+https://github.com/LLLin000/PaperForge.git@{_pv}"]
result = subprocess.run(
[sys.executable, "-m", "pip", "install", "--upgrade"] + install_target,
capture_output=True,