Skip to content

Commit cdbcf85

Browse files
authored
fix version.tag (#231)
* restore version.tag * Downgrade artifact actions@v3 due to unreliability
1 parent 95dc2a3 commit cdbcf85

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

download-build-artifact/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ runs:
6363
id: prep
6464
shell: bash
6565

66-
- uses: actions/download-artifact@v4
66+
- uses: actions/download-artifact@v3
6767
id: download
6868
with:
6969
name: ${{ steps.prep.outputs.artifact-name }}

id/id.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ Deno.writeTextFileSync(ghout!, `json=${JSON.stringify(json)}\n`, {append: true})
2727

2828
Deno.writeTextFileSync(Deno.env.get("GITHUB_ENV")!, `BREWKIT_PKGJSON=${JSON.stringify(json)}\n`, {append: true})
2929

30-
console.log(json)
30+
console.log(`::notice::${JSON.stringify(json)}`)

lib/config.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import useConfig from "libpkgx/hooks/useConfig.ts"
2-
import { Path, Package, PackageRequirement, utils, hooks, plumbing, Installation, SemVer, semver } from "pkgx"
2+
import { Path, Package, PackageRequirement, utils, hooks, plumbing, Installation } from "pkgx"
33
const { flatmap, host } = utils
44
const { usePantry } = hooks
55
const { hydrate } = plumbing
@@ -104,15 +104,6 @@ export default async function config(arg?: string): Promise<Config> {
104104
}
105105
}
106106

107-
async function get_pantry_status() {
108-
const bkroot = new Path(new URL(import.meta.url).pathname).parent().parent()
109-
const proc = new Deno.Command("bash", {args: [bkroot.join('bin/cmd/status').string], stdout: 'piped'}).spawn()
110-
const [out, { success }] = await Promise.all([proc.output(), proc.status])
111-
if (success) {
112-
return new TextDecoder().decode(out.stdout).split(/\s+/).filter(x => x)
113-
}
114-
}
115-
116107
function platform_cache() {
117108
return flatmap(Deno.env.get('XDG_CACHE_HOME'), Path.abs) ?? (platform =>
118109
platform == 'darwin' ? Path.home().join('Library/Caches') : Path.home().join(".cache")

lib/resolve-pkg.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export default async function(arg?: string) {
1313
if (arg.startsWith("{")) {
1414
const json = JSON.parse(arg)
1515
const project = json.project
16-
const version = new SemVer(json.version.raw)
16+
const version = new SemVer(json.version.raw);
17+
(version as unknown as any).tag = json.version.tag
1718
const [found] = await usePantry().find(project)
1819
return {
1920
pkg: {project, version},

upload-build-artifact/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ runs:
4040
id: tar
4141
shell: bash
4242

43-
- uses: actions/upload-artifact@v4
43+
- uses: actions/upload-artifact@v3
4444
with:
4545
path: ${{ steps.tar.outputs.path }}
4646
name: ${{ steps.tar.outputs.name }}

0 commit comments

Comments
 (0)