| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 47ed959 commit 2567709
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,6 +38,7 @@ on: | |||
| 38 | 38 | - root-certificates | |
| 39 | 39 | - simdjson | |
| 40 | 40 | - sqlite | |
| 41 | + - temporal | ||
| 41 | 42 | - undici | |
| 42 | 43 | - uvwasi | |
| 43 | 44 | - zlib | |
@@ -255,6 +256,14 @@ jobs: | |||
| 255 | 256 | cat temp-output | |
| 256 | 257 | tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true | |
| 257 | 258 | rm temp-output | |
| 259 | + - id: temporal | ||
| 260 | + subsystem: deps | ||
| 261 | + label: dependencies | ||
| 262 | + run: | | ||
| 263 | + ./tools/dep_updaters/update-temporal.sh > temp-output | ||
| 264 | + cat temp-output | ||
| 265 | + tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true | ||
| 266 | + rm temp-output | ||
| 258 | 267 | - id: undici | |
| 259 | 268 | subsystem: deps | |
| 260 | 269 | label: dependencies | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,70 @@ | |||
| 1 | + #!/bin/sh | ||
| 2 | + set -e | ||
| 3 | + # Shell script to update temporal in the source tree to specific version | ||
| 4 | + | ||
| 5 | + BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) | ||
| 6 | + | ||
| 7 | + [ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" | ||
| 8 | + [ -x "$NODE" ] || NODE=$(command -v node) | ||
| 9 | + | ||
| 10 | + # shellcheck disable=SC1091 | ||
| 11 | + . "$BASE_DIR/tools/dep_updaters/utils.sh" | ||
| 12 | + | ||
| 13 | + NEW_VERSION="$("$NODE" --input-type=module <<'EOF' | ||
| 14 | + const res = await fetch('https://api.github.com/repos/boa-dev/temporal/releases/latest'); | ||
| 15 | + if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); | ||
| 16 | + const { tag_name } = await res.json(); | ||
| 17 | + console.log(tag_name.replace('v', '')); | ||
| 18 | + EOF | ||
| 19 | + )" | ||
| 20 | + | ||
| 21 | + CURRENT_VERSION=$(grep -m 1 version ./deps/temporal/Cargo.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3) | ||
| 22 | + | ||
| 23 | + # This function exit with 0 if new version and current version are the same | ||
| 24 | + compare_dependency_version "temporal" "$NEW_VERSION" "$CURRENT_VERSION" | ||
| 25 | + | ||
| 26 | + echo "Making temporary workspace" | ||
| 27 | + | ||
| 28 | + WORKSPACE=$(mktemp -d 2> /dev/null || mktemp -d -t 'tmp') | ||
| 29 | + | ||
| 30 | + cleanup () { | ||
| 31 | + EXIT_CODE=$? | ||
| 32 | + [ -d "$WORKSPACE" ] && rm -rf "$WORKSPACE" | ||
| 33 | + exit $EXIT_CODE | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + trap cleanup INT TERM EXIT | ||
| 37 | + | ||
| 38 | + TEMPORAL_TARBALL="$NEW_VERSION.tar.gz" | ||
| 39 | + | ||
| 40 | + cd "$WORKSPACE" | ||
| 41 | + | ||
| 42 | + curl -sL -o "$TEMPORAL_TARBALL" "https://github.com/boa-dev/temporal/archive/refs/tags/v$NEW_VERSION.tar.gz" | ||
| 43 | + log_and_verify_sha256sum "temporal" "$TEMPORAL_TARBALL" | ||
| 44 | + | ||
| 45 | + gzip -dc "$TEMPORAL_TARBALL" | tar xf - | ||
| 46 | + | ||
| 47 | + rm "$TEMPORAL_TARBALL" | ||
| 48 | + | ||
| 49 | + mv "temporal-$NEW_VERSION" temporal | ||
| 50 | + | ||
| 51 | + rm -rf "$WORKSPACE/temporal/.github" | ||
| 52 | + | ||
| 53 | + echo "Copying existing gyp files" | ||
| 54 | + cp "$BASE_DIR/deps/temporal/temporal_capi/temporal_capi.gyp" "$WORKSPACE/temporal/temporal_capi" | ||
| 55 | + | ||
| 56 | + echo "Applying dependency update" | ||
| 57 | + rm -rf "$BASE_DIR/deps/temporal" | ||
| 58 | + mv "$WORKSPACE/temporal" "$BASE_DIR/deps/temporal" | ||
| 59 | + | ||
| 60 | + echo "All done!" | ||
| 61 | + echo "" | ||
| 62 | + echo "Please git add temporal and commit the new version:" | ||
| 63 | + echo "" | ||
| 64 | + echo "$ git add -A deps/temporal" | ||
| 65 | + echo "$ git commit -m \"deps: update temporal to $NEW_VERSION\"" | ||
| 66 | + echo "" | ||
| 67 | + | ||
| 68 | + # The last line of the script should always print the new version, | ||
| 69 | + # as we need to add it to $GITHUB_ENV variable. | ||
| 70 | + echo "NEW_VERSION=$NEW_VERSION" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments