Skip to content

Commit a35b02e

Browse files
committed
ts → rs
1 parent 6a195bf commit a35b02e

File tree

153 files changed

+5102
-7771
lines changed

Some content is hidden

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

153 files changed

+5102
-7771
lines changed

.gitbook.yaml

+20-14
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

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

77
FROM debian:buster-slim as stage1
8-
RUN apt-get update && apt --yes install libc-dev libstdc++-8-dev libgcc-8-dev netbase libudev-dev
8+
RUN apt-get update && apt --yes install libc-dev libstdc++-8-dev libgcc-8-dev netbase libudev-dev ca-certificates
99
COPY --from=stage0 /usr/local/bin/pkgx /usr/local/bin/pkgx
10+
COPY --from=stage0 /usr/local/bin/pkgm /usr/local/bin/pkgm
1011
COPY --from=stage0 /root/.bashrc /root/.bashrc
1112
ENV BASH_ENV /root/.bashrc
1213
SHELL ["/bin/bash", "-c"]

.github/markdownlint.yml

+13-28
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

+1-1
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

+3-1
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

+3
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

+1-1
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

+29-20
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,20 @@ concurrency:
1414

1515
jobs:
1616
qa:
17-
uses: ./.github/workflows/ci.yml
18-
19-
integration-tests:
20-
uses: ./.github/workflows/ci.shellcode.yml
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest]
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: dtolnay/rust-toolchain@stable
24+
- run: cargo test --all-features
25+
env:
26+
RUSTFLAGS: "-D warnings"
2127

2228
attach-srcs:
2329
runs-on: ubuntu-latest
24-
needs: [qa, integration-tests]
30+
needs: qa
2531
env:
2632
FILENAME: pkgx-${{ github.event.inputs.version }}
2733
steps:
@@ -30,8 +36,6 @@ jobs:
3036
path: ${{ env.FILENAME }}
3137
- name: clean
3238
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
3539
- name: include GPG pubkey
3640
run: echo "${{ secrets.GPG_PUBLIC_KEY }}" | base64 -d > $FILENAME/pkgx.dev.pub.asc
3741
- run: tar cJf $FILENAME.tar.xz $FILENAME
@@ -66,6 +70,8 @@ jobs:
6670
build-id: darwin+aarch64
6771
- os: [self-hosted, linux, ARM64]
6872
build-id: linux+aarch64
73+
pkgs: llvm.org perl gnu.org/make xz
74+
# ^^ our linux aarch64 builder is much more raw than the others for some reason
6975
fail-fast: false
7076
runs-on: ${{ matrix.platform.os }}
7177
name: ${{ matrix.platform.build-id }}
@@ -78,31 +84,34 @@ jobs:
7884

7985
- uses: pkgxdev/setup@v2
8086
with:
81-
+: unzip xz
82-
83-
- run: pkgx +xz tar xJf pkgx-${{ github.event.inputs.version }}.tar.xz --strip-components=1
87+
+: ${{ matrix.platform.pkgs }}
8488

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
89+
- run: tar xJf pkgx-${{ github.event.inputs.version }}.tar.xz --strip-components=1
9090

91-
- run: deno task compile
91+
- uses: dtolnay/rust-toolchain@stable
9292

93-
- uses: pkgxdev/brewkit/actions/setup-codesign@v0
93+
- name: Build
94+
run: |
95+
if [ ${{ matrix.platform.build-id }} = "linux+aarch64" ]; then
96+
export AR=llvm-ar
97+
fi
98+
cargo build --release
99+
mv target/release/pkgx .
100+
strip ./pkgx
101+
102+
- uses: pkgxdev/pantry/.github/actions/setup@main
94103
if: startsWith(matrix.platform.build-id, 'darwin+')
95104
with:
96105
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }}
97106
p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
107+
APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }}
98108

99-
# codesign always fails for deno binaries, even though it
100-
# signs fine. See https://github.com/denoland/deno/issues/575
101109
- run: codesign
102110
--sign "$APPLE_IDENTITY" --force
103-
--preserve-metadata=entitlements,requirements,flags,runtime ./pkgx || true
111+
--preserve-metadata=entitlements,requirements,flags,runtime ./pkgx
104112
env:
105113
APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }}
114+
if: startsWith(matrix.platform.build-id, 'darwin+')
106115

107116
- name: sanity check
108117
run: test "$(./pkgx --version)" = "pkgx ${{ github.event.inputs.version }}"

.github/workflows/ci.docker.yaml

-50
This file was deleted.

.github/workflows/ci.docker.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: ci·docker
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/Dockerfile
7+
- .github/workflows/ci.docker.yml
8+
9+
concurrency:
10+
group: ci/docker/${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
packages: write
16+
17+
jobs:
18+
docker-build:
19+
runs-on: ubuntu-latest
20+
container: debian:buster-slim
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- run: apt-get update && apt-get install -y curl gcc perl make
25+
26+
- uses: dtolnay/rust-toolchain@stable
27+
- run: cargo build --release
28+
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: products
32+
path: ./target/release/pkgx
33+
34+
docker-test:
35+
runs-on: ubuntu-latest
36+
needs: docker-build
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- uses: actions/download-artifact@v4
41+
with:
42+
name: products
43+
44+
- run: |
45+
mkdir products
46+
mv ./pkgx products/$(uname -m)
47+
curl https://pkgxdev.github.io/pkgm/pkgm.ts -o products/pkgm
48+
49+
- run:
50+
docker build
51+
--tag pkgxdev/pkgx
52+
--file .github/Dockerfile
53+
.
54+
55+
- run: |
56+
cat <<EoD> Dockerfile
57+
FROM pkgxdev/pkgx
58+
RUN pkgx --version
59+
RUN if git --version; then exit 1; fi
60+
RUN pkgx git --version
61+
RUN pkgm install git
62+
RUN if ! git --version; then exit 2; fi
63+
EoD
64+
65+
docker build --file Dockerfile .

.github/workflows/ci.md.yml

+2-2
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)