Skip to content

Commit

Permalink
improve wget in pacman and docs (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
deer-wmde authored Feb 23, 2024
1 parent 1f419be commit 7270f28
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/build-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ Assuming neither `dist-persist` directory or `pacman.yaml` have changed then run
There is a GitHub Action [Workflow](../.github/workflows/wbstack.sync.check.yml) running to attempt to ensure that `sync.sh` has been run on every commit so that the dist directory does not get out of sync from what it is built from.

### wikiman & pacman
#### wikiman
> usage: `./sync/wikiman/wikiman .`
`wikiman` is a MediaWiki specific yaml generator for pacman.
This needs to be run by developers when updating component versions in `wikiman.yaml`

> In order to be able to run wikiman you need to create a GitHub token in a file called `/sync/.github`.
> The token does not require any special permissions, and it does not matter if it's a `classic` or `fine-grained token (beta)` token.
> You can generate a new token [here](https://github.com/settings/tokens/1118022750).
#### pacman
`pacman` is a generic tool using yaml to fetch a series of codebases and place them on disk.
This is run as a step in `sync.sh`

Expand Down
3 changes: 1 addition & 2 deletions sync/pacman/pacman-script
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ for codebase in $(yq eval -o=j $YAMLFILE | jq -cr '.[]'); do
temporaryFile="${TEMPORARY_DIR}/${name}"
temporaryExtraction="${TEMPORARY_DIR}/${name}-extracted"
echo "Downloading '${name}' from '${artifactUrl}'"
wget "$artifactUrl" -O "${temporaryFile}"
wget --progress=dot:mega --retry-on-host-error --tries 10 --retry-connrefused "$artifactUrl" -O "${temporaryFile}"
echo "Extracting '${name}' to '${temporaryExtraction}'"
mkdir -p ${temporaryExtraction}
bsdtar --strip-components=${artifactLevel} -xf "${temporaryFile}" -C "${temporaryExtraction}"
echo "Downloading and extracting '${name}' COMPLETE"
sleep 2
echo
done

Expand Down
1 change: 1 addition & 0 deletions sync/pacman/pacman.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN apk add \
# coreutils for a version of realpath with a -m option
coreutils \
curl \
wget \
git \
jq \
libarchive-tools \
Expand Down

0 comments on commit 7270f28

Please sign in to comment.