Skip to content

Commit 8dbfeef

Browse files
committed
ts → rs
1 parent 6a195bf commit 8dbfeef

File tree

155 files changed

+5143
-7770
lines changed

Some content is hidden

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

155 files changed

+5143
-7770
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: 4 additions & 3 deletions
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

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.crates.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: cd·crates
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
required: true
11+
12+
concurrency:
13+
group: cd/crates/${{ github.event.release.tag_name || github.event.inputs.tag }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
publish:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.event.release.tag_name || github.event.inputs.tag }}
23+
- uses: dtolnay/rust-toolchain@stable
24+
- uses: katyo/publish-crates@v2
25+
with:
26+
args: --all-features
27+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ 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 }}
31+
fileName: pkgx-*.tar.xz
32+
33+
- run: ls -la
3134

3235
- name: Unpack Binaries
3336
run: |

.github/workflows/cd.yml

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
workflow_dispatch:
77
inputs:
88
version:
9+
description: version *w/out* the v prefix
910
required: true
1011

1112
concurrency:
@@ -14,14 +15,20 @@ concurrency:
1415

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

2229
attach-srcs:
2330
runs-on: ubuntu-latest
24-
needs: [qa, integration-tests]
31+
needs: qa
2532
env:
2633
FILENAME: pkgx-${{ github.event.inputs.version }}
2734
steps:
@@ -30,8 +37,6 @@ jobs:
3037
path: ${{ env.FILENAME }}
3138
- name: clean
3239
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
3540
- name: include GPG pubkey
3641
run: echo "${{ secrets.GPG_PUBLIC_KEY }}" | base64 -d > $FILENAME/pkgx.dev.pub.asc
3742
- run: tar cJf $FILENAME.tar.xz $FILENAME
@@ -61,14 +66,17 @@ jobs:
6166
- os: ["self-hosted", "macOS", "X64"]
6267
build-id: darwin+x86-64
6368
- os: ubuntu-latest
69+
container: debian:buster-slim
6470
build-id: linux+x86-64
6571
- os: [self-hosted, macOS, ARM64]
6672
build-id: darwin+aarch64
6773
- os: [self-hosted, linux, ARM64]
6874
build-id: linux+aarch64
75+
pkgs: llvm.org perl gnu.org/make xz
6976
fail-fast: false
7077
runs-on: ${{ matrix.platform.os }}
7178
name: ${{ matrix.platform.build-id }}
79+
container: ${{ matrix.platform.container }}
7280
env:
7381
FILENAME: pkgx-${{ github.event.inputs.version }}+${{ matrix.platform.build-id }}.tar.xz
7482
steps:
@@ -78,31 +86,41 @@ jobs:
7886

7987
- uses: pkgxdev/setup@v2
8088
with:
81-
+: unzip xz
89+
+: ${{ matrix.platform.pkgs }}
8290

83-
- run: pkgx +xz tar xJf pkgx-${{ github.event.inputs.version }}.tar.xz --strip-components=1
91+
- name: Prep
92+
run: |
93+
case ${{ matrix.platform.build-id }} in
94+
linux+aarch64)
95+
echo AR=llvm-ar >> $GITHUB_ENV;;
96+
linux+x86-64)
97+
apt-get update
98+
apt-get install curl gcc perl-modules openssl make xz-utils gpg-agent --yes;;
99+
esac
100+
# ^^ gpg-agent due to worrying bug running gpg with `pkgx` which I cannot debug RN
84101

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

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

93-
- uses: pkgxdev/brewkit/actions/setup-codesign@v0
106+
- run: |
107+
cargo build --release
108+
mv target/release/pkgx .
109+
strip ./pkgx
110+
111+
- uses: pkgxdev/pantry/.github/actions/setup@main
94112
if: startsWith(matrix.platform.build-id, 'darwin+')
95113
with:
96114
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }}
97115
p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
116+
APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }}
98117

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

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

.github/workflows/ci.docker.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)