Skip to content

Commit fd8f792

Browse files
committed
wip
1 parent c646061 commit fd8f792

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

.github/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ COPY ./brewkit /work/brewkit
77
COPY ./deno.jsonc /work/deno.jsonc
88
COPY ./deno.lock /work/deno.lock
99
RUN cd /work && find ./brewkit -name \*.ts | xargs pkgx deno cache
10+
RUN pkgx deno cache /work/.github/scripts/generate-versions
1011

1112
FROM debian:buster-slim AS stage2
1213
COPY --from=stage1 /usr/local/bin/pkgx /usr/local/bin/pkgx

.github/actions/setup/action.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
1515
"$PWD\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1616
17-
Get-ChildItem -Path brewkit -Recurse -Filter *.ts | ForEach-Object { .\\bin\\pkgx deno -q cache $_.FullName }
17+
Get-ChildItem -Path brewkit .github/scripts/generate-versions -Recurse -Filter *.ts | ForEach-Object { .\\bin\\pkgx deno -q cache $_.FullName }
1818
shell: pwsh
1919
if: runner.os == 'Windows'
2020
@@ -24,18 +24,15 @@ runs:
2424
# $HOME is different in the docker image vs. github actions
2525
ln -s /root/.pkgx $HOME
2626
ln -s /root/.cache $HOME
27-
./bin/pkg-convert
2827
;;
2928
Darwin)
3029
curl https://pkgx.sh/$(uname)/$(uname -m).tgz | sudo tar xz -C /usr/local/bin
31-
find brewkit .github -name \*.ts | xargs pkgx deno^2 --quiet cache
32-
./bin/pkg-convert
33-
;;
34-
*)
35-
# must be GNU make inside git-bash on Windows
36-
make -f ./bin/pkg-convert
30+
find brewkit -name \*.ts | xargs pkgx deno^2 --quiet cache
31+
pkgx deno^2 --quiet cache .github/scripts/generate-versions
3732
;;
3833
esac
3934
35+
./bin/pkg-convert
36+
4037
echo "$PWD/bin" >> $GITHUB_PATH
4138
shell: bash

.github/scripts/generate-versions.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ setlocal
33

44
set SCRIPT_DIR=%~dp0
55

6-
pkgx -q deno run --ext=ts --quiet --allow-net --allow-read --allow-env --allow-sys "%SCRIPT_DIR%pkg-build" %*
6+
pkgx -q deno run --ext=ts --quiet --allow-net --allow-read --allow-env --allow-sys "%SCRIPT_DIR%generate-versions" %*
77
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
88

99
endlocal

bin/pkg-convert

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ SRCROOT := $(abspath $(MAKEFILE_DIR)/..)
66
PKG_FILES := $(shell find $(SRCROOT)/projects -name package.yml)
77
OUTPUTS := $(PKG_FILES:$(SRCROOT)/projects/%=$(SRCROOT)/artifacts/pantry/projects/%)
88

9-
# ifeq ($(OS),Windows_NT)
10-
# DENO := deno.exe run -R --ext=ts
11-
# endif
12-
139
all: $(OUTPUTS)
1410

1511
# Rule to process each package.yml file
1612
$(SRCROOT)/artifacts/pantry/projects/%: $(SRCROOT)/projects/%
1713
@mkdir -p $(dir $@)
18-
$(DENO) $(SRCROOT)/bin/pkg-convert-project "$<" > "$@"
14+
$(SRCROOT)/bin/pkg-convert-project "$<" > "$@"
1915

2016
debug:
2117
@echo "PKG_FILES: $(PKG_FILES)"

0 commit comments

Comments
 (0)