Skip to content

Commit af728dd

Browse files
committed
tools: fix lint + single indentation
1 parent 1596c43 commit af728dd

File tree

3 files changed

+41
-39
lines changed

3 files changed

+41
-39
lines changed

doc/contributing/maintaining/maintaining-dependencies.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This a list of all the dependencies:
3030
* [simdutf 3.2.9][]
3131
* [undici 5.22.1][]
3232
* [uvwasi 0.0.16][]
33-
* [V8 11.3.244.8][]
33+
* [v8 11.3.244.8][]
3434
* [zlib 1.2.13][]
3535

3636
Any code which meets one or more of these conditions should
@@ -305,7 +305,7 @@ implement WASI calls.
305305
Under the hood, uvwasi leverages libuv where possible for maximum portability.
306306
See [maintaining-web-assembly][] for more informations.
307307

308-
### V8 11.3.244.8
308+
### v8 11.3.244.8
309309

310310
[V8](https://chromium.googlesource.com/v8/v8.git/) is Google's open source
311311
high-performance JavaScript and WebAssembly engine, written in C++.
@@ -348,5 +348,5 @@ performance improvements not currently available in standard zlib.
348348
[undici 5.22.1]: #undici-5221
349349
[update-openssl-action]: ../../../.github/workflows/update-openssl.yml
350350
[uvwasi 0.0.16]: #uvwasi-0016
351-
[V8 11.3.244.8]: #V8-1132448
351+
[v8 11.3.244.8]: #v8-1132448
352352
[zlib 1.2.13]: #zlib-1213

tools/dep_updaters/update-v8-patch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NEW_VERSION="$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION.$CURRENT_BUILD_VERSIO
2727

2828

2929
# Update the version number
30-
update_dependency_version "V8" "$NEW_VERSION"
30+
update_dependency_version "v8" "$NEW_VERSION"
3131

3232
echo "All done!"
3333
echo ""

tools/dep_updaters/utils.sh

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,47 @@
22

33
ROOT=$(cd "$(dirname "$0")/../.." && pwd)
44

5-
# This function compare new version with current version of a depdendency and exit
6-
# the script if the versions are the same
5+
# This function compare new version with current version of a depdendency and
6+
# exit the script if the versions are the same
77
#
8-
# $1 is the package name e.g. 'acorn', 'ada', 'base64' etc. See that file
9-
# for a complete list of package name
8+
# $1 is the package name e.g. 'acorn', 'ada', 'base64' etc. See the file
9+
# doc/contributing/maintaining/maintaining-dependencies.md for a complete list
10+
# of package name
1011
# $2 is the new version.
1112
compare_dependency_version() {
12-
package_name="$1"
13-
new_version="$2"
14-
current_version="$3"
15-
echo "Comparing $new_version with $current_version"
16-
if [ "$new_version" = "$current_version" ]; then
17-
echo "Skipped because $package_name is on the latest version."
18-
exit 0
19-
fi
13+
package_name="$1"
14+
new_version="$2"
15+
current_version="$3"
16+
echo "Comparing $new_version with $current_version"
17+
if [ "$new_version" = "$current_version" ]; then
18+
echo "Skipped because $package_name is on the latest version."
19+
exit 0
20+
fi
2021
}
2122

2223
# This function inform to commit the new version of a maintained dependency
2324
# and print the last line of the script "NEW_VERSION=$NEW_VERSION" as we need
2425
# to add it to $GITHUB_ENV variable.
2526
#
26-
# $1 is the package name e.g. 'acorn', 'ada', 'base64' etc. See that file
27-
# for a complete list of package name
27+
# $1 is the package name e.g. 'acorn', 'ada', 'base64' etc. See the file
28+
# doc/contributing/maintaining/maintaining-dependencies.md for a complete list
29+
# of package name
2830
# $2 is the new version.
2931
finalize_version_update() {
30-
package_name="$1"
31-
new_version="$2"
32-
echo "All done!"
33-
echo ""
34-
echo "Please git add $package_name, commit the new version:"
35-
echo ""
36-
echo "$ git add -A deps/$package_name"
37-
echo "$ git add doc/contributing/maintaining/maintaining-dependencies.md"
38-
echo "$ git commit -m \"deps: update $package_name to $new_version\""
39-
echo ""
32+
package_name="$1"
33+
new_version="$2"
34+
echo "All done!"
35+
echo ""
36+
echo "Please git add $package_name, commit the new version:"
37+
echo ""
38+
echo "$ git add -A deps/$package_name"
39+
echo "$ git add doc/contributing/maintaining/maintaining-dependencies.md"
40+
echo "$ git commit -m \"deps: update $package_name to $new_version\""
41+
echo ""
4042

41-
# The last line of the script should always print the new version,
42-
# as we need to add it to $GITHUB_ENV variable.
43-
echo "NEW_VERSION=$new_version"
43+
# The last line of the script should always print the new version,
44+
# as we need to add it to $GITHUB_ENV variable.
45+
echo "NEW_VERSION=$new_version"
4446
}
4547

4648
# This function update the version of a maintained dependency in
@@ -50,12 +52,12 @@ finalize_version_update() {
5052
# for a complete list of package name
5153
# $2 is the new version.
5254
update_dependency_version() {
53-
package_name="$1"
54-
new_version="$2"
55-
deps_file_path="$ROOT/doc/contributing/maintaining/maintaining-dependencies.md"
56-
# Remove version dots for anchor markdown
57-
version_no_dots=$(echo "$new_version" | sed -e 's/\.//g')
58-
perl -i -pe 's|^\* \['"$package_name"'.*|* ['"$package_name"' '"$new_version"'][]|' "$deps_file_path"
59-
perl -i -pe 's|^\['"$package_name"'.*\]: #'"$package_name"'.*|['"$package_name"' '"$new_version"']: #'"$package_name"'-'"$version_no_dots"'|' "$deps_file_path"
60-
perl -i -pe 's|^### '"$package_name"'.*|### '"$package_name"' '"$new_version"'|' "$deps_file_path"
55+
package_name="$1"
56+
new_version="$2"
57+
deps_file_path="$ROOT/doc/contributing/maintaining/maintaining-dependencies.md"
58+
# Remove version dots for anchor markdown
59+
version_no_dots=$(echo "$new_version" | sed -e 's/\.//g')
60+
perl -i -pe 's|^\* \['"$package_name"'.*|* ['"$package_name"' '"$new_version"'][]|' "$deps_file_path"
61+
perl -i -pe 's|^\['"$package_name"'.*\]: #'"$package_name"'.*|['"$package_name"' '"$new_version"']: #'"$package_name"'-'"$version_no_dots"'|' "$deps_file_path"
62+
perl -i -pe 's|^### '"$package_name"'.*|### '"$package_name"' '"$new_version"'|' "$deps_file_path"
6163
}

0 commit comments

Comments
 (0)