Skip to content

Commit 067edcc

Browse files
committed
ts → rs
1 parent 6a195bf commit 067edcc

File tree

152 files changed

+4907
-7698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+4907
-7698
lines changed

.gitbook.yaml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
root:
22
./docs/
33
redirects:
4-
pantry: pantry.md
5-
shell-integration: shell-integration.md
6-
shellcode: shell-integration.md
7-
getting-started: run/anywhere/terminals.md
8-
quickstart: run/anywhere/terminals.md
9-
installing-w/out-brew: run/anywhere/terminals.md
10-
docker: run/anywhere/docker.md
11-
ci-cd: run/anywhere/ci-cd.md
12-
scripts: run/anywhere/scripts.md
13-
editors: run/anywhere/editors.md
14-
pkgx-install: pkgx-install.md
15-
install: pkgx-install.md
16-
support: support.md
17-
dev: dev.md
4+
installing-w/out-brew: getting-started.md
5+
pantry: pkging/pantry.md
6+
getting-started: getting-started.md
7+
quickstart: getting-started.md
8+
189
help/pkg-not-cached: https://github.com/orgs/pkgxdev/discussions/new?category=help&title=pkg-not-cached
1910
help/http-failure: https://github.com/orgs/pkgxdev/discussions/new?category=help&title=http-failure
2011
help/ambiguous-pkgspec: https://github.com/orgs/pkgxdev/discussions/new?category=help&title=ambiguous-pkgspec
12+
13+
# links should never die
14+
docker: getting-started.md
15+
ci-cd: getting-started.md
16+
scripts: scripting.md
17+
run/anywhere/terminals.md: getting-started.md
18+
run/anywhere/docker.md: getting-started.md
19+
run/anywhere/ci-cd.md: getting-started.md
20+
run/anywhere/scripts.md: scripting.md
21+
pantry.md: pkging/pantry.md
22+
pantry-api.md: pkging/pantry.md
23+
pkgx-install: https://github.com/pkgxdev/pkgm
24+
install: https://github.com/pkgxdev/pkgm
25+
support: https://github.com/pkgxdev/discussions
26+
dev: https://github.com/pkgxdev/dev

.github/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
FROM debian:buster-slim as stage0
22
COPY ./products/* /pkgx/
33
RUN cp /pkgx/$(uname -m) /usr/local/bin/pkgx
4+
RUN chmod +x /usr/local/bin/pkgx
5+
RUN install -m 755 /pkgx/pkgm /usr/local/bin/pkgm
46
RUN echo 'export PS1="\\[\\033[38;5;63m\\]pkgx\\[\\033[0m\\]\\w $ "' >> /root/.bashrc
5-
RUN pkgx integrate
67

78
FROM debian:buster-slim as stage1
89
RUN apt-get update && apt --yes install libc-dev libstdc++-8-dev libgcc-8-dev netbase libudev-dev
910
COPY --from=stage0 /usr/local/bin/pkgx /usr/local/bin/pkgx
11+
COPY --from=stage0 /usr/local/bin/pkgm /usr/local/bin/pkgm
1012
COPY --from=stage0 /root/.bashrc /root/.bashrc
1113
ENV BASH_ENV /root/.bashrc
1214
SHELL ["/bin/bash", "-c"]

.github/markdownlint.yml

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,17 @@
1-
# use banner rather than an h1 at the top of the file
2-
MD041: false
3-
4-
# extra lines to offset content
5-
MD012: false
6-
7-
# skipping heading levels as needed for display purposes
8-
MD001: false
1+
default:
2+
true
93

10-
# "prompts" in code examples
11-
MD014: false
12-
13-
# consecutive distinct blockquotes
14-
MD028: false
15-
16-
# sometimes, you need HTML: <details>
17-
MD033: false
4+
MD013:
5+
code_blocks: false
6+
tables: false
187

19-
# duplicate headers are sometimes useful
20-
MD024: false
8+
# Honestly most of the lint rules are absurd, we disable these *at least*
219

22-
# can't split up a table row
23-
MD013: false
24-
25-
# some titles end in 'etc.'
26-
MD026: false
27-
28-
# gitbook provides its own top-level heading so we use `#` as `##`
10+
# First line in a file should be a top-level heading
11+
MD041: false
12+
# Multiple top-level headings in the same document
2913
MD025: false
30-
31-
# this is working around gitbook styling issues
32-
MD029: false
14+
# Inline HTML
15+
MD033: false
16+
# Multiple consecutive blank lines
17+
MD012: false

.github/workflows/cd.brew.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
bump-tap:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: aurelien-baudet/workflow-dispatch@v2
16+
- uses: aurelien-baudet/workflow-dispatch@v4
1717
with:
1818
workflow: bump.yml
1919
repo: pkgxdev/homebrew-made

.github/workflows/cd.docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
build-and-push-image:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: robinraju/release-downloader@v1.9
20+
- uses: robinraju/release-downloader@v1.11
2121
with:
2222
releaseId: ${{ github.event.release.id }}
2323

@@ -35,6 +35,8 @@ jobs:
3535
mv linux+x86-64 products/x86_64
3636
mv linux+aarch64 products/aarch64
3737
38+
curl -o products/pkgm https://pkgxdev.github.io/pkgm/pkgm.ts
39+
3840
- uses: actions/checkout@v4
3941
with:
4042
path: src

.github/workflows/cd.vx.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ jobs:
2020
- uses: fischerscode/tagger@v0
2121
with:
2222
prefix: v
23+
- run: |
24+
git tag -f latest
25+
git push origin latest --force

.github/workflows/cd.www.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2626
aws-region: us-east-1
2727

28-
- uses: robinraju/release-downloader@v1.9
28+
- uses: robinraju/release-downloader@v1.11
2929
with:
3030
releaseId: ${{ github.event.release.id || github.event.inputs.release-id }}
3131

.github/workflows/cd.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@ jobs:
1616
qa:
1717
uses: ./.github/workflows/ci.yml
1818

19-
integration-tests:
20-
uses: ./.github/workflows/ci.shellcode.yml
21-
2219
attach-srcs:
2320
runs-on: ubuntu-latest
24-
needs: [qa, integration-tests]
21+
needs: [qa]
2522
env:
2623
FILENAME: pkgx-${{ github.event.inputs.version }}
2724
steps:
@@ -30,8 +27,6 @@ jobs:
3027
path: ${{ env.FILENAME }}
3128
- name: clean
3229
run: rm -rf ${{ env.FILENAME }}/.github .gitbook.yml
33-
- name: stamp version.ts
34-
run: echo "export default function() { return '${{github.event.inputs.version}}' }" > $FILENAME/src/modes/version.ts
3530
- name: include GPG pubkey
3631
run: echo "${{ secrets.GPG_PUBLIC_KEY }}" | base64 -d > $FILENAME/pkgx.dev.pub.asc
3732
- run: tar cJf $FILENAME.tar.xz $FILENAME
@@ -82,25 +77,22 @@ jobs:
8277

8378
- run: pkgx +xz tar xJf pkgx-${{ github.event.inputs.version }}.tar.xz --strip-components=1
8479

85-
# we would prefer this, but our pkging is not stable enough :/
86-
# - uses: pkgxdev/dev@v0
87-
- uses: denoland/setup-deno@v2
88-
with:
89-
deno-version: ^2.1.4
80+
- uses: dtolnay/rust-toolchain@stable
9081

91-
- run: deno task compile
82+
- run: |
83+
cargo build --release
84+
mv .target/release/pkgx .
85+
strip ./pkgx
9286
93-
- uses: pkgxdev/brewkit/actions/setup-codesign@v0
87+
- uses: pkgxdev/brewkit/actions/setup-codesign@v1
9488
if: startsWith(matrix.platform.build-id, 'darwin+')
9589
with:
9690
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }}
9791
p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
9892

99-
# codesign always fails for deno binaries, even though it
100-
# signs fine. See https://github.com/denoland/deno/issues/575
10193
- run: codesign
10294
--sign "$APPLE_IDENTITY" --force
103-
--preserve-metadata=entitlements,requirements,flags,runtime ./pkgx || true
95+
--preserve-metadata=entitlements,requirements,flags,runtime ./pkgx
10496
env:
10597
APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }}
10698

@@ -131,7 +123,4 @@ jobs:
131123
v${{ github.event.inputs.version }}
132124
$FILENAME $FILENAME.asc
133125
env:
134-
# using this token rather than github.token due to `release not found` bug
135-
# https://github.com/pkgxdev/cli/issues/5252
136-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
137-
GH_REPO: pkgxdev/pkgx
126+
GH_TOKEN: ${{ github.token }}
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
paths:
66
- .github/Dockerfile
7+
- .github/workflows/ci.docker.yml
78

89
concurrency:
910
group: ci/docker/${{ github.ref }}
@@ -14,15 +15,18 @@ permissions:
1415
packages: write
1516

1617
jobs:
17-
build-and-test:
18+
docker-build-and-test:
1819
runs-on: ubuntu-latest
1920
steps:
2021
- uses: actions/checkout@v4
2122

23+
- uses: dtolnay/rust-toolchain@stable
24+
- run: cargo build
25+
2226
- run: |
2327
mkdir products
24-
curl https://pkgx.sh/$(uname)/$(uname -m).gz | gunzip > products/$(uname -m)
25-
chmod +x products/*
28+
mv ./target/debug/pkgx > products/$(uname -m)
29+
curl https://pkgxdev.github.io/pkgm/pkgm.ts -o products/pkgm
2630
2731
- run:
2832
docker build
@@ -33,18 +37,10 @@ jobs:
3337
- run: |
3438
cat <<EoD> Dockerfile
3539
FROM pkgxdev/pkgx
36-
RUN env +duf && duf
37-
RUN if which duf; then exit 1; fi
38-
EoD
39-
40-
docker build --file Dockerfile .
41-
42-
- run: |
43-
cat <<EoD> Dockerfile
44-
FROM pkgxdev/pkgx
45-
RUN echo '{}' > package.json
46-
RUN dev && npm --version
47-
RUN if which npm; then exit 1; fi
40+
RUN if git --version; then exit 1; fi
41+
RUN pkgx git --version
42+
RUN pkgm install git
43+
RUN if ! git --version; then exit 2; fi
4844
EoD
4945
5046
docker build --file Dockerfile .

.github/workflows/ci.md.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: ci·markdown-lint
1+
name: ci·md
22

33
on:
44
pull_request:
55
paths:
6-
- '**.md'
6+
- 'docs/**.md'
77
- .github/workflows/ci.md.yml
88

99
concurrency:

0 commit comments

Comments
 (0)