Skip to content

Commit

Permalink
Website now uses melpa_snapshot_versions.json instead of snapshot_ver…
Browse files Browse the repository at this point in the history
…sions.json (#27)
  • Loading branch information
xuhdev authored Jan 11, 2025
1 parent 2e9c121 commit 9ffa223
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ FROM snapshot-versions-getter-base as snapshot-versions-getter-prod

RUN apk add --no-cache wget

RUN wget --check-certificate https://delpa.org/snapshot_versions.json && \
wget --check-certificate https://delpa.org/snapshot_versions.json.sha256
RUN wget --check-certificate https://delpa.org/melpa_snapshot_versions.json && \
wget --check-certificate https://delpa.org/melpa_snapshot_versions.json.sha256

# Verify that snapshot_versions.json is in the sha256 checksum file and verify
# checksum
RUN grep snapshot_versions.json snapshot_versions.json.sha256 && \
sha256sum -c snapshot_versions.json.sha256
# Verify that melpa_snapshot_versions.json is in the sha256 checksum file and
# verify checksum
RUN grep melpa_snapshot_versions.json melpa_snapshot_versions.json.sha256 && \
sha256sum -c melpa_snapshot_versions.json.sha256

# Test snapshot versions
FROM snapshot-versions-getter-base as snapshot-versions-getter-test

COPY ./snapshot_versions.json .
COPY ./melpa_snapshot_versions.json .

FROM snapshot-versions-getter-${snapshot_versions_type} as snapshot-versions-getter

Expand All @@ -52,7 +52,7 @@ FROM docker.io/node:22.12.0-alpine@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6
COPY package.json package-lock.json ./
RUN npm install -g npm && npm install
COPY . .
COPY --from=snapshot-versions-getter ./snapshot_versions.json .
COPY --from=snapshot-versions-getter ./melpa_snapshot_versions.json .
RUN npx tsx gen_caddy.ts > Caddyfile

FROM docker.io/caddy:2.8.4-alpine@sha256:e97e0e3f8f51be708a9d5fadbbd75e3398c22fc0eecd4b26d48561e3f7daa9eb
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ After starting the test server, to run test:

npm run test

The `snapshot_versions.json` file in this repo is deliberately set wrong and for
test purpose only. In production build, it will be replaced by the file grabbed
from https://delpa.org/snapshot_versions.json.
The `melpa_snapshot_versions.json` file in this repo is deliberately set wrong
and for test purpose only. In production build, it will be replaced by the file
grabbed from https://delpa.org/melpa_snapshot_versions.json.

## Bug Report and Feature Request

Expand Down
2 changes: 1 addition & 1 deletion gen_caddy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/** Generate the caddyfile. */

import snapshotVersions from "./snapshot_versions.json" with { type: "json" };
import snapshotVersions from "./melpa_snapshot_versions.json" with { type: "json" };

const snapshotVersionsRegexp = snapshotVersions.join("|");

Expand Down
File renamed without changes.

0 comments on commit 9ffa223

Please sign in to comment.