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

tools: fix dep_updaters dir updates #51294

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions tools/dep_updaters/update-c-ares.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ cp "$DEPS_DIR/cares/cares.gyp" "$WORKSPACE/cares"
cp "$DEPS_DIR/cares/"*.gn "$DEPS_DIR/cares/"*.gni "$WORKSPACE/cares"

echo "Replacing existing c-ares"
rm -rf "$DEPS_DIR/cares"
mv "$WORKSPACE/cares" "$DEPS_DIR/"
replace_dir "$DEPS_DIR/cares" "$WORKSPACE/cares"

# Update the version number on maintaining-dependencies.md
# and print the new version as the last line of the script as we need
Expand Down
2 changes: 1 addition & 1 deletion tools/dep_updaters/update-nghttp3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ autoreconf -i

./configure --prefix="$PWD/build" --enable-lib-only

cp -R lib/* "$DEPS_DIR/ngtcp2/nghttp3/lib/"
replace_dir "$DEPS_DIR/ngtcp2/nghttp3/lib" "lib"

# Update the version number on maintaining-dependencies.md
# and print the new version as the last line of the script as we need
Expand Down
5 changes: 2 additions & 3 deletions tools/dep_updaters/update-ngtcp2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ autoreconf -i

./configure --prefix="$PWD/build" --enable-lib-only

cp -R lib/* "$DEPS_DIR/ngtcp2/ngtcp2/lib/"

cp -R crypto/* "$DEPS_DIR/ngtcp2/ngtcp2/crypto/"
replace_dir "$DEPS_DIR/ngtcp2/ngtcp2/lib" "lib"
replace_dir "$DEPS_DIR/ngtcp2/ngtcp2/crypto" "crypto"

# Update the version number on maintaining-dependencies.md
# and print the new version as the last line of the script as we need
Expand Down
4 changes: 2 additions & 2 deletions tools/dep_updaters/update-uvwasi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ mv "$WORKSPACE/"*.gyp "$WORKSPACE/"*.gn "$WORKSPACE/"*.gni "$DEPS_DIR/uvwasi/"
cd "$DEPS_DIR/uvwasi/"

echo "Copying new files to deps folder"
cp -r "$UVWASI_ZIP/include" "$DEPS_DIR/uvwasi/"
cp -r "$UVWASI_ZIP/src" "$DEPS_DIR/uvwasi/"
replace_dir "$DEPS_DIR/uvwasi/include" "$UVWASI_ZIP/include"
replace_dir "$DEPS_DIR/uvwasi/src" "$UVWASI_ZIP/src"
cp "$UVWASI_ZIP/LICENSE" "$DEPS_DIR/uvwasi/"
rm -rf "$UVWASI_ZIP"

Expand Down
8 changes: 8 additions & 0 deletions tools/dep_updaters/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,11 @@ log_and_verify_sha256sum() {
fi
fi
}

# This function replaces the directory of a dependency with the new one.
replace_dir() {
old_dir="$1"
new_dir="$2"
rm -rf "$old_dir"
mv "$new_dir" "$old_dir"
}
Loading