mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix: fix release archives
This commit is contained in:
@@ -52,13 +52,18 @@ for (const tag of tags) {
|
||||
|
||||
if (!Script.preview) {
|
||||
// Create archives for GitHub release
|
||||
// kilocode_change start - use absolute paths to avoid issues with scoped package names containing '/'
|
||||
const archiveDir = `${dir}/dist/archives`
|
||||
await $`mkdir -p ${archiveDir}`
|
||||
for (const key of Object.keys(binaries)) {
|
||||
const archiveName = key.replace("/", "-") // @kilocode/cli-linux-arm64 → @kilocode-cli-linux-arm64
|
||||
if (key.includes("linux")) {
|
||||
await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`)
|
||||
await $`tar -czf ${archiveDir}/${archiveName}.tar.gz *`.cwd(`dist/${key}/bin`)
|
||||
} else {
|
||||
await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`)
|
||||
await $`zip -r ${archiveDir}/${archiveName}.zip *`.cwd(`dist/${key}/bin`)
|
||||
}
|
||||
}
|
||||
// kilocode_change end
|
||||
|
||||
const image = "ghcr.io/Kilo-Org/kilo"
|
||||
const platforms = "linux/amd64,linux/arm64"
|
||||
|
||||
@@ -4,14 +4,20 @@ import { Script } from "@opencode-ai/script"
|
||||
|
||||
if (!Script.preview) {
|
||||
// Calculate SHA values
|
||||
const arm64Sha = await $`sha256sum ./dist/@kilocode/cli-linux-arm64.tar.gz | cut -d' ' -f1`
|
||||
// kilocode_change start - archives now use '-' instead of '/' and are in archives/ subdirectory
|
||||
const arm64Sha = await $`sha256sum ./dist/archives/@kilocode-cli-linux-arm64.tar.gz | cut -d' ' -f1`
|
||||
.text()
|
||||
.then((x) => x.trim())
|
||||
const x64Sha = await $`sha256sum ./dist/@kilocode/cli-linux-x64.tar.gz | cut -d' ' -f1`.text().then((x) => x.trim())
|
||||
const macX64Sha = await $`sha256sum ./dist/@kilocode/cli-darwin-x64.zip | cut -d' ' -f1`.text().then((x) => x.trim())
|
||||
const macArm64Sha = await $`sha256sum ./dist/@kilocode/cli-darwin-arm64.zip | cut -d' ' -f1`
|
||||
const x64Sha = await $`sha256sum ./dist/archives/@kilocode-cli-linux-x64.tar.gz | cut -d' ' -f1`
|
||||
.text()
|
||||
.then((x) => x.trim())
|
||||
const macX64Sha = await $`sha256sum ./dist/archives/@kilocode-cli-darwin-x64.zip | cut -d' ' -f1`
|
||||
.text()
|
||||
.then((x) => x.trim())
|
||||
const macArm64Sha = await $`sha256sum ./dist/archives/@kilocode-cli-darwin-arm64.zip | cut -d' ' -f1`
|
||||
.text()
|
||||
.then((x) => x.trim())
|
||||
// kilocode_change end
|
||||
|
||||
const [pkgver, _subver = ""] = Script.version.split(/(-.*)/, 2)
|
||||
|
||||
|
||||
@@ -59,14 +59,18 @@ for (const tag of tags) {
|
||||
|
||||
if (!Script.preview) {
|
||||
// Create archives for GitHub release
|
||||
await $`mkdir -p dist/@kilocode` // kilocode_change
|
||||
// kilocode_change start - use absolute paths to avoid issues with scoped package names containing '/'
|
||||
const archiveDir = `${dir}/dist/archives`
|
||||
await $`mkdir -p ${archiveDir}`
|
||||
for (const key of Object.keys(binaries)) {
|
||||
const archiveName = key.replace("/", "-") // @kilocode/cli-linux-arm64 → @kilocode-cli-linux-arm64
|
||||
if (key.includes("linux")) {
|
||||
await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`)
|
||||
await $`tar -czf ${archiveDir}/${archiveName}.tar.gz *`.cwd(`dist/${key}/bin`)
|
||||
} else {
|
||||
await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`)
|
||||
await $`zip -r ${archiveDir}/${archiveName}.zip *`.cwd(`dist/${key}/bin`)
|
||||
}
|
||||
}
|
||||
// kilocode_change end
|
||||
|
||||
const image = "ghcr.io/kilo-org/kilo" // kilocode_change
|
||||
const platforms = "linux/amd64,linux/arm64"
|
||||
|
||||
Reference in New Issue
Block a user