GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: automate updates for test/fixtures/test426 · nodejs/node@111c77e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • tools.yml
  • tools/dep_updaters
    • update-test426-fixtures.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/tools.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/tools.yml
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ on:
3838
- root-certificates
3939
- simdjson
4040
- sqlite
41+
- test426-fixtures
4142
- undici
4243
- uvwasi
4344
- zlib
@@ -255,6 +256,14 @@ jobs:
255256
cat temp-output
256257
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
257258
rm temp-output
259+
- id: test426-fixtures
260+
subsystem: test
261+
label: test
262+
run: |
263+
bash tools/dep_updaters/update-test426-fixtures.sh > temp-output
264+
cat temp-output
265+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
266+
rm temp-output
258267
- id: undici
259268
subsystem: deps
260269
label: dependencies
Collapse file

‎tools/dep_updaters/update-test426-fixtures.sh‎

Copy file name to clipboard
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
3+
set -ex
4+
5+
BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd)
6+
7+
TARGET_DIR="$BASE_DIR/test/fixtures/test426"
8+
README="$BASE_DIR/test/test426/README.md"
9+
TARBALL_URL=$(curl -fsIo /dev/null -w '%header{Location}' https://github.com/tc39/source-map-tests/archive/HEAD.tar.gz)
10+
SHA=$(basename "$TARBALL_URL")
11+
12+
CURRENT_SHA=$(sed -n 's#^.*https://github.com/tc39/source-map-tests/commit/\([0-9a-f]*\).*$#\1#p' "$README")
13+
14+
if [ "$CURRENT_SHA" = "$SHA" ]; then
15+
echo "Already up-to-date"
16+
exit 0
17+
fi
18+
19+
rm -rf "$TARGET_DIR"
20+
mkdir "$TARGET_DIR"
21+
curl -f "$TARBALL_URL" | tar -xz --strip-components 1 -C "$TARGET_DIR"
22+
23+
TMP_FILE=$(mktemp)
24+
sed "s/$CURRENT_SHA/$SHA/" "$README" > "$TMP_FILE"
25+
mv "$TMP_FILE" "$README"
26+
27+
# The last line of the script should always print the new version,
28+
# as we need to add it to $GITHUB_ENV variable.
29+
echo "NEW_VERSION=$SHA"

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.