Repository navigation
feat(installer): add standalone hosted install and uninstall flow #3828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
136 commits
Select commit
Hold shift + click to select a range
eb2a9a8
feat(installer): add standalone archive installation
yiliang114 d2e5b1b
fix(installer): harden standalone archive installs
yiliang114 d7277a6
fix(installer): address standalone review findings
yiliang114 5719595
chore(installer): clarify review followups
yiliang114 472e51e
fix(installer): stabilize standalone script checks
yiliang114 47fdfbc
chore(installer): remove internal planning docs
yiliang114 2b40bad
chore(installer): simplify standalone release review fixes
yiliang114 a4a15e1
test(installer): add Windows batch install smoke
yiliang114 fee13e4
test(installer): fix Windows batch smoke quoting
yiliang114 69e22f9
test(installer): preserve Windows cmd quotes
yiliang114 faa9087
fix(installer): use robust Windows checksum hashing
yiliang114 66dec5f
ci: narrow installer debug matrix
yiliang114 1ca86fe
fix(installer): address standalone review hardening
yiliang114 0eb58a8
fix(installer): avoid Windows validation parse errors
yiliang114 e7e3f90
fix(installer): simplify Windows option validation
yiliang114 fee51d1
fix(installer): harden standalone review fixes
yiliang114 ec654dd
feat(installer): publish release installer assets
yiliang114 ccf83e9
fix(installer): address release asset review feedback
yiliang114 b078ade
fix(installer): avoid prerelease installer asset links
yiliang114 668c006
test(installer): isolate standalone dist fixture
yiliang114 a205e6c
feat(installer): add hosted install release alias
yiliang114 bbaa8ff
chore: no changes - code review requested
Copilot 6534e6f
fix(installer): pin versioned installer assets
yiliang114 5983d11
fix: parallelize Node.js binary downloads in standalone release build
wenshao 6c80ef8
fix(installer): address release asset review followups
yiliang114 bca4a7f
refactor(installer): share release CLI parsing
yiliang114 3570f93
fix(installer): address release asset review followups
yiliang114 51c14f4
fix(installer): unblock Windows CI for standalone install path
yiliang114 44ac229
fix(installer): address release asset review findings
yiliang114 f9d9a3b
fix(installer): keep installer entrypoint hosted
yiliang114 587dc1f
feat(installer): stage hosted installation assets
yiliang114 27a1bbe
fix(installer): reject stale hosted assets
yiliang114 51778f9
fix(installer): refine hosted asset staging
yiliang114 2e4086a
fix(installer): tighten hosted default-version check, flag legacy URL
yiliang114 4100b8e
feat(installer): verify installation release assets
yiliang114 362bf58
fix(installer): tighten verifier base-url + clarify test helper
yiliang114 4eb3108
chore(installer): merge main after standalone installer landed
yiliang114 1917316
fix(installer): address standalone review follow-ups
yiliang114 1502f72
fix(installer): repair Windows installer tests
yiliang114 fddbfdc
fix(release): tighten standalone asset checks
yiliang114 1f1f5cd
fix(installer): stabilize Windows managed install checks
yiliang114 7d4fc13
test(installer): relax Windows installer timeout
yiliang114 f6696e8
feat(installer): fold hosted release checks into installer flow
yiliang114 a244a2e
fix(test): escape release asset regex
yiliang114 9bde745
test(cli): avoid POSIX node path in relaunch test
yiliang114 728b35f
fix(installer): align npm fallback node gate with engines
yiliang114 bb8b810
test(installer): allow Windows archive validation more time
yiliang114 55f28b6
Merge remote-tracking branch 'origin/main' into codex/installer-relea…
yiliang114 d2acf7f
fix(installer): remove stale node 20 installer references
yiliang114 725a06e
docs(installer): clarify hosted endpoint sync requirement
yiliang114 a10bd1c
refactor(installer): reuse standaloneArchiveName in release verifier
yiliang114 d0bd8c6
fix(scripts): address release verifier review feedback
yiliang114 926c10a
feat(installer): add standalone archive installer with multi-platform…
yiliang114 2ae9d0c
feat(installer): support QWEN_INSTALL_GITHUB_REPO env var for custom …
yiliang114 02e5706
chore(installer): exclude local-only staging tools from PR
yiliang114 34a86bd
fix(installer): enforce CRLF line endings for .bat files via gitattri…
yiliang114 2ca9dcd
fix(installer): store .bat files with CRLF in git blob for raw GitHub…
yiliang114 3549a34
fix(installer): follow HTTP redirects in UrlExists and RaceMirrorHead…
yiliang114 bd7602b
fix(installer): surface download errors and add MaximumRedirection 10
yiliang114 68f05db
feat(installer): add hosted install-qwen.ps1 shim for irm|iex one-liner
yiliang114 439092e
Merge branch 'main' of https://github.com/QwenLM/qwen-code into codex…
yiliang114 eeabd1b
fix(installer): stage direct hosted install scripts
yiliang114 7b9817a
Merge branch 'main' of https://github.com/QwenLM/qwen-code into codex…
yiliang114 b8e5490
chore(installer): trim hosted release diff scope
yiliang114 fedcbae
chore(installer): narrow hosted release diff
yiliang114 af64da8
feat(installer): restore hosted PowerShell entrypoint
yiliang114 5f649c9
chore(installer): stage standalone hosted entrypoints
yiliang114 984b1a9
fix(installer): address hosted installer review followups
yiliang114 9093577
fix(installer): stabilize Windows installer tests
yiliang114 72a5efe
fix(installer): make Windows option validation readable
yiliang114 7d328be
feat(installer): wire Aliyun OSS sync, address review followups
yiliang114 b0ae7f8
ci(installer): add temporary OSS smoke test
yiliang114 48977ae
fix(installer): make OSS release assets public-readable
yiliang114 645edb8
chore(installer): remove temporary OSS smoke workflow
yiliang114 0c8022d
fix(installer): address hosted installer review gaps
yiliang114 c6005a7
feat(installer): refactor argument parsing and utility functions for …
yiliang114 540bcb8
fix(installer): harden hosted release script checks
yiliang114 4095171
fix(installer): suppress PowerShell progress bar in hosted entrypoint…
yiliang114 4b950ab
fix(installer): suppress PowerShell progress bar in bat installer dow…
yiliang114 01e9767
fix(installer): use curl.exe -# progress bar in Windows downloads
yiliang114 046d200
fix(installer): suppress progress bars for small downloads and Expand…
yiliang114 ccbdd34
fix(installer): auto-backup non-qwen directories and simplify output
yiliang114 24cb1c7
fix(installer): revert Expand-Archive progress suppression in bat
yiliang114 31e3c43
fix(installer): fix cmd.exe parsing error in backup fallback code
yiliang114 b7f190a
fix(installer): always persist install bin to user PATH
yiliang114 c3b488f
fix(installer): persist PATH to current terminal session on Windows
yiliang114 bdf101b
docs(installer): document cmd.exe one-liner for immediate PATH availa…
yiliang114 38c4706
feat(installer): make qwen usable immediately from PowerShell after i…
yiliang114 564f899
fix(installer): remove non-functional doskey approach for cmd parent
yiliang114 74130fc
fix(installer): make Windows standalone shim available in cmd
yiliang114 75e5b58
feat(installer): add standalone uninstall scripts
yiliang114 d2ebed9
fix(uninstall): match shell-quoted paths when removing the wrapper
yiliang114 db0a44d
fix(installer): update download commands to use progress indicators f…
yiliang114 8fb2bc1
fix(installer): resolve Aliyun latest via version pointer
yiliang114 db8677f
fix(installer): cleanup mirror probe temp dirs
yiliang114 40ac124
fix(installer): harden standalone release fallback
yiliang114 bae9333
fix(installer): address standalone review feedback
yiliang114 a79745b
style(installer): align standalone install output
yiliang114 7fd314a
fix(installer): print standalone uninstall commands
yiliang114 7d665f3
fix(installer): address release review follow-ups
yiliang114 c959913
fix(installer): harden Windows target detection
yiliang114 b2b43b5
test(installer): stabilize Windows fake tool path
yiliang114 308fe4d
fix(installer): allow explicit Windows curl path
yiliang114 1d272f6
test(installer): use cmd fake curl on Windows
yiliang114 778919f
test(installer): cover Windows fake curl helper
yiliang114 ecfad99
test(installer): inject Windows arch overrides in cmd
yiliang114 ce45abd
test(cli): wait for prompt suggestion render
yiliang114 78d0c86
test(cli): revert prompt suggestion wait tweak
yiliang114 b3e21a5
fix(installer): harden hosted release publishing
yiliang114 0994a80
fix(installer): harden Windows latest pointer parsing
yiliang114 63ec525
fix(installer): bound Windows download timeouts
yiliang114 0155a4f
fix(installer): bound hosted installer probes
yiliang114 308358d
fix(release): make ossutil download configurable
yiliang114 c2a3e5c
Merge remote-tracking branch 'origin/main' into codex/pr-3828-install…
yiliang114 3eb6d6c
fix(installer): address hosted release review feedback
yiliang114 625dfbf
test(installer): keep dist backup on same filesystem
yiliang114 3f60c2c
fix(installer): address remaining review feedback on PR #3828
yiliang114 273a012
fix(release): correct OSS credentials lifetime and mirror probe fallback
yiliang114 a1ef869
fix(installer): address review feedback round 2
yiliang114 0a5d308
fix(installer): address review feedback round 3
yiliang114 89b272d
test(installer): add parseUploadArgs unit tests and align verify deri…
yiliang114 547713a
test(installer): add uploadAssets integration tests with fake ossutil
yiliang114 bab96dc
revert(installer): drop over-engineered ossutil/upload changes
yiliang114 3caf3e2
test(installer): cover Windows release script regressions
yiliang114 4a8fea5
test(release): avoid Windows shim lookup in oss upload tests
yiliang114 98315b2
test(installer): use stable fake Aliyun version on Windows
yiliang114 584bb59
fix(installer): parse Aliyun latest version in batch
yiliang114 62ab5f4
fix(installer): validate Aliyun latest version without findstr
yiliang114 b69af67
fix(installer): normalize Aliyun latest version via PowerShell
yiliang114 f832d33
fix(installer): avoid captured PowerShell output in batch latest parsing
yiliang114 994f2f4
fix(installer): normalize Aliyun latest pointer from file
yiliang114 ba695a8
test(installer): fix fake Windows curl output parsing
yiliang114 09b04d6
fix(installer): print checksum path on miss, gate hardcoded version p…
yiliang114 89d58aa
fix: stamp release version in hosted installers and add Zip Slip prot…
yiliang114 cb3f356
fix(installer): add SOURCE to PowerShell unsafe-character validation …
yiliang114 18525b3
fix: correct copyright year 2025 -> 2026 in new files [skip ci]
yiliang114 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -379,6 +379,14 @@ jobs: | |
| npm run bundle | ||
| npm run prepare:package | ||
|
|
||
| - name: 'Build Standalone Archives' | ||
| env: | ||
| RELEASE_VERSION: '${{ needs.prepare.outputs.release_version }}' | ||
| run: 'npm run package:standalone:release -- --version "${RELEASE_VERSION}" --out-dir dist/standalone' | ||
|
|
||
| - name: 'Build Installation Assets' | ||
| run: 'npm run package:installation-assets -- --out-dir dist/standalone' | ||
|
|
||
| - name: 'Publish @qwen-code/qwen-code' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] npm publish(第 444 行)在 OSS 同步(第 533 行)之前执行。如果 OSS 上传失败,npm 用户已获得新版本,而 OSS 建议:将 OSS 同步移到 npm publish 之前,或至少添加一个验证步骤:在 npm publish 后确认 OSS 资产已可用,否则回滚 npm 发布。 — DeepSeek/deepseek-v4-pro via Qwen Code /review |
||
| working-directory: 'dist' | ||
| run: |- | ||
|
|
@@ -411,6 +419,10 @@ jobs: | |
|
|
||
| gh release create "${RELEASE_TAG}" \ | ||
| dist/cli.js \ | ||
| dist/standalone/qwen-code-* \ | ||
| dist/standalone/install-qwen.sh \ | ||
| dist/standalone/install-qwen.bat \ | ||
| dist/standalone/SHA256SUMS \ | ||
| --target "${RELEASE_BRANCH}" \ | ||
| --title "Release ${RELEASE_TAG}" \ | ||
| --notes-start-tag "${PREVIOUS_RELEASE_TAG}" \ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| /** | ||
| * @license | ||
| * Copyright 2025 Qwen Team | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| import fs from 'node:fs'; | ||
| import path from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { writeSha256Sums } from './create-standalone-package.js'; | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); | ||
| const rootDir = path.resolve(__dirname, '..'); | ||
|
|
||
| const INSTALLATION_ASSETS = [ | ||
| { | ||
| source: path.join( | ||
| rootDir, | ||
| 'scripts', | ||
| 'installation', | ||
| 'install-qwen-with-source.sh', | ||
| ), | ||
| output: 'install-qwen.sh', | ||
| mode: 0o755, | ||
| }, | ||
| { | ||
| source: path.join( | ||
| rootDir, | ||
| 'scripts', | ||
| 'installation', | ||
| 'install-qwen-with-source.bat', | ||
| ), | ||
| output: 'install-qwen.bat', | ||
| }, | ||
| ]; | ||
|
|
||
| if (isMainModule()) { | ||
| try { | ||
| const args = parseArgs(process.argv.slice(2)); | ||
| if (args.help) { | ||
|
yiliang114 marked this conversation as resolved.
Resolved
|
||
| printUsage(); | ||
| } else { | ||
| await buildInstallationAssets( | ||
| path.resolve(args.outDir || path.join(rootDir, 'dist', 'standalone')), | ||
| ); | ||
| } | ||
| } catch (error) { | ||
| console.error(error instanceof Error ? error.message : error); | ||
| process.exitCode = 1; | ||
| } | ||
| } | ||
|
|
||
| function isMainModule() { | ||
| return process.argv[1] && path.resolve(process.argv[1]) === __filename; | ||
| } | ||
|
|
||
| async function buildInstallationAssets(outDir) { | ||
| fs.mkdirSync(outDir, { recursive: true }); | ||
|
|
||
| for (const asset of INSTALLATION_ASSETS) { | ||
| if (!fs.existsSync(asset.source)) { | ||
| fail(`Installation source asset not found: ${asset.source}`); | ||
| } | ||
|
|
||
| const destination = path.join(outDir, asset.output); | ||
| fs.copyFileSync(asset.source, destination); | ||
| if (asset.mode !== undefined && process.platform !== 'win32') { | ||
| fs.chmodSync(destination, asset.mode); | ||
| } | ||
| } | ||
|
|
||
| await writeSha256Sums(outDir); | ||
|
yiliang114 marked this conversation as resolved.
Resolved
|
||
| } | ||
|
|
||
| function parseArgs(argv) { | ||
| const args = { | ||
| help: false, | ||
| outDir: undefined, | ||
| }; | ||
|
yiliang114 marked this conversation as resolved.
Resolved
|
||
|
|
||
| for (let index = 0; index < argv.length; index += 1) { | ||
| const arg = argv[index]; | ||
| switch (arg) { | ||
| case '--help': | ||
| case '-h': | ||
| args.help = true; | ||
| break; | ||
| case '--out-dir': | ||
| args.outDir = readOptionValue(argv, index, arg); | ||
| index += 1; | ||
| break; | ||
| default: | ||
| fail(`Unknown option: ${arg}`); | ||
| } | ||
| } | ||
|
|
||
| return args; | ||
| } | ||
|
|
||
| function readOptionValue(argv, index, optionName) { | ||
| const value = argv[index + 1]; | ||
| if (!value || value.startsWith('-')) { | ||
| fail(`${optionName} requires a value`); | ||
| } | ||
| return value; | ||
| } | ||
|
|
||
| function printUsage() { | ||
| console.log(` | ||
| Usage: | ||
| npm run package:installation-assets -- [OPTIONS] | ||
|
|
||
| Options: | ||
| --out-dir PATH Output directory. Defaults to dist/standalone. | ||
| `); | ||
| } | ||
|
|
||
| function fail(message) { | ||
| throw new Error(`ERROR: ${message}`); | ||
| } | ||
|
|
||
| export { buildInstallationAssets, INSTALLATION_ASSETS }; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.