Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ecb735db0 |
@@ -16,18 +16,20 @@ const supportedTargets = new Map([
|
|||||||
|
|
||||||
function parseArguments(argv) {
|
function parseArguments(argv) {
|
||||||
const options = {}
|
const options = {}
|
||||||
|
const optionNames = new Map([
|
||||||
|
['--manifest', 'manifest'],
|
||||||
|
['--base-url', 'baseUrl'],
|
||||||
|
['--output', 'output']
|
||||||
|
])
|
||||||
for (let index = 0; index < argv.length; index += 1) {
|
for (let index = 0; index < argv.length; index += 1) {
|
||||||
const argument = argv[index]
|
const argument = argv[index]
|
||||||
if (
|
const optionName = optionNames.get(argument)
|
||||||
argument === '--manifest' ||
|
if (optionName) {
|
||||||
argument === '--base-url' ||
|
|
||||||
argument === '--output'
|
|
||||||
) {
|
|
||||||
const value = argv[index + 1]
|
const value = argv[index + 1]
|
||||||
if (!value) {
|
if (!value) {
|
||||||
throw new Error(`${argument} 缺少值`)
|
throw new Error(`${argument} 缺少值`)
|
||||||
}
|
}
|
||||||
options[argument.slice(2)] = value
|
options[optionName] = value
|
||||||
index += 1
|
index += 1
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`未知参数:${argument}`)
|
throw new Error(`未知参数:${argument}`)
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "goodbuddy",
|
"name": "goodbuddy",
|
||||||
"version": "0.10.2",
|
"version": "0.10.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "goodbuddy",
|
"name": "goodbuddy",
|
||||||
"version": "0.10.2",
|
"version": "0.10.3",
|
||||||
"license": "0BSD",
|
"license": "0BSD",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@agentclientprotocol/sdk": "0.25.1",
|
"@agentclientprotocol/sdk": "0.25.1",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "goodbuddy",
|
"name": "goodbuddy",
|
||||||
"version": "0.10.2",
|
"version": "0.10.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Secure desktop AI workspace with controlled Agent Runtimes",
|
"description": "Secure desktop AI workspace with controlled Agent Runtimes",
|
||||||
"desktopName": "GoodBuddy",
|
"desktopName": "GoodBuddy",
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
"formatVersion": 1,
|
"formatVersion": 1,
|
||||||
"releases": [
|
"releases": [
|
||||||
{
|
{
|
||||||
"version": "0.10.2",
|
"version": "0.10.3",
|
||||||
"releasedAt": "2026-08-17",
|
"releasedAt": "2026-08-17",
|
||||||
"notes": {
|
"notes": {
|
||||||
"zh-CN": {
|
"zh-CN": {
|
||||||
"highlights": [
|
"highlights": [
|
||||||
"GoodBuddy 0.10.2 新增可选的镜像节点,并改进最近对话的时间显示。"
|
"GoodBuddy 0.10.3 新增可选的镜像节点,并改进最近对话的时间显示。"
|
||||||
],
|
],
|
||||||
"features": [
|
"features": [
|
||||||
"**镜像节点与更新源。** 在“关于与更新”中可选择 GitHub(默认)或镜像节点。手动检查、启动时检查和打开下载页会使用同一选择,应用仍只检查版本,不会自动下载安装。"
|
"**镜像节点与更新源。** 在“关于与更新”中可选择 GitHub(默认)或镜像节点。手动检查、启动时检查和打开下载页会使用同一选择,应用仍只检查版本,不会自动下载安装。"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"en-US": {
|
"en-US": {
|
||||||
"highlights": [
|
"highlights": [
|
||||||
"GoodBuddy 0.10.2 adds an optional mirror node and improves how recent conversation times are displayed."
|
"GoodBuddy 0.10.3 adds an optional mirror node and improves how recent conversation times are displayed."
|
||||||
],
|
],
|
||||||
"features": [
|
"features": [
|
||||||
"**Mirror node and update source.** About & Updates now lets you choose GitHub (default) or the mirror node. Manual checks, startup checks, and the download page use the same selection. GoodBuddy still checks versions only and never downloads or installs updates automatically."
|
"**Mirror node and update source.** About & Updates now lets you choose GitHub (default) or the mirror node. Manual checks, startup checks, and the download page use the same selection. GoodBuddy still checks versions only and never downloads or installs updates automatically."
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { createRequire } from 'node:module'
|
import { createRequire } from 'node:module'
|
||||||
|
import { resolve } from 'node:path'
|
||||||
import { describe, expect, it, vi } from 'vitest'
|
import { describe, expect, it, vi } from 'vitest'
|
||||||
|
|
||||||
interface ReleaseFile {
|
interface ReleaseFile {
|
||||||
@@ -9,6 +10,11 @@ interface ReleaseFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface SiteReleaseModule {
|
interface SiteReleaseModule {
|
||||||
|
parseArguments: (argv: string[]) => {
|
||||||
|
manifest: string
|
||||||
|
baseUrl: string
|
||||||
|
output: string
|
||||||
|
}
|
||||||
createSiteRelease: (
|
createSiteRelease: (
|
||||||
manifest: object,
|
manifest: object,
|
||||||
baseUrl: string
|
baseUrl: string
|
||||||
@@ -68,6 +74,23 @@ function createAggregateManifest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('site release manifest', () => {
|
describe('site release manifest', () => {
|
||||||
|
it('parses the CLI options used by the release workflow', () => {
|
||||||
|
expect(
|
||||||
|
siteRelease.parseArguments([
|
||||||
|
'--manifest',
|
||||||
|
'dist/release-upload/release-manifest.json',
|
||||||
|
'--base-url',
|
||||||
|
'https://example.com/releases/v1.2.3/',
|
||||||
|
'--output',
|
||||||
|
'dist/site-release.json'
|
||||||
|
])
|
||||||
|
).toEqual({
|
||||||
|
manifest: resolve('dist/release-upload/release-manifest.json'),
|
||||||
|
baseUrl: 'https://example.com/releases/v1.2.3/',
|
||||||
|
output: resolve('dist/site-release.json')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
it('creates direct HTTPS download entries for all release targets', () => {
|
it('creates direct HTTPS download entries for all release targets', () => {
|
||||||
const result = siteRelease.createSiteRelease(
|
const result = siteRelease.createSiteRelease(
|
||||||
createAggregateManifest(),
|
createAggregateManifest(),
|
||||||
|
|||||||
Reference in New Issue
Block a user