Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WinGet source repo support #87

Merged
merged 24 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a4a0272
winget-source: init
stevapple Feb 28, 2023
5f1eec7
winget-source: cleans up temp directory before exit
stevapple Feb 28, 2023
a7f1204
winget-source: update package.json
stevapple Feb 28, 2023
ff9fc01
winget-source: improves Dockerized performance
stevapple Mar 1, 2023
15b9e96
winget-source: use modified time instead of MD5
stevapple Mar 1, 2023
7b79c69
winget-source: better naming
stevapple Mar 1, 2023
900f121
winget-source: more robust `getRemoteURL()`
stevapple Mar 7, 2023
2d0215e
winget-source: JSDoc-styled documentation
stevapple Mar 7, 2023
4e6f64f
winget-source: support debug mode
stevapple Mar 7, 2023
a0f60dc
winget-source: skip update if bundle is unchanged
stevapple Mar 7, 2023
56edf94
winget-source: add description in README
stevapple Mar 7, 2023
d022afe
winget-source: add default upstream URL
stevapple Mar 7, 2023
ed1c477
winget-source: fix file permission
stevapple Mar 7, 2023
a845682
winget-source: style fix
stevapple Mar 7, 2023
96b834b
winget-source: support logging to file
stevapple Mar 8, 2023
8389af8
winget-source: sync newer manifests first
stevapple Mar 8, 2023
67d11a9
winget-source: update NPM package name
stevapple Mar 8, 2023
374550c
winget-source: remove skipped messages from log
stevapple Mar 8, 2023
25ab342
winget-source: simplify setup
stevapple Mar 8, 2023
783fef3
winget-source: support `BIND_ADDRESS`
stevapple Mar 8, 2023
ddcbd8e
winget-source: clarify actually used options
stevapple Mar 8, 2023
2150373
winget-source: simplify `Dockerfile`
stevapple Mar 9, 2023
f44d7fb
winget-source: improves Docker image layer cache
stevapple Mar 9, 2023
a3f3f42
winget-source: style update
stevapple Mar 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- [rsync](#rsync)
- [rubygems](#rubygems)
- [stackage](#stackage)
- [winget-source](#winget-source)
- [yum-sync](#yum-sync)
- [License](#license)
- [Contributing](#contributing)
Expand Down Expand Up @@ -413,6 +414,18 @@ Stackage doesn't need to specify upstream, but this mirror use cabal to install

Read the [user guide](https://www.haskell.org/cabal/users-guide/installing-packages.html#repository-specification) before writing preferred mirror to `config`

### winget-source

[![winget-source](https://img.shields.io/docker/image-size/ustcmirror/winget-source/latest)](https://hub.docker.com/r/ustcmirror/winget-source "winget-source")
[![winget-source](https://img.shields.io/docker/pulls/ustcmirror/winget-source)](https://hub.docker.com/r/ustcmirror/winget-source "winget-source")

A handy tool to sync pre-indexed [Windows Package Manager](https://github.com/microsoft/winget-cli) (aka. WinGet) sources.

| Parameter | Description |
| --------------------- | ---------------------------------------------------------------- |
| `WINGET_REPO_URL` | Sets the URL of upstream. Defaults to [`https://cdn.winget.microsoft.com/cache`](https://cdn.winget.microsoft.com/cache) |
| `WINGET_REPO_JOBS` | Parallel jobs. Defaults to 8. |

### yum-sync

[![yum-sync](https://img.shields.io/docker/image-size/ustcmirror/yum-sync/latest)](https://hub.docker.com/r/ustcmirror/yum-sync "yum-sync")
Expand Down
12 changes: 12 additions & 0 deletions winget-source/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ustcmirror/base:alpine
LABEL maintainer "YR Chen <stevapple@icloud.com>"

RUN apk add --no-cache nodejs

ADD ["package.json", "package-lock.json", "/"]
RUN apk add --no-cache npm python3 && \
npm ci --prefix / --only=production && \
npm cache clean --force && \
apk del --purge --no-cache npm python3

ADD ["sync.sh", "sync-repo.js", "utilities.js", "/"]
Loading