Skip to content

Commit

Permalink
build: Generate Edge moderator info
Browse files Browse the repository at this point in the history
  • Loading branch information
matatk committed Aug 8, 2021
1 parent 3a608e7 commit 70bcb6c
Showing 1 changed file with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
in='meta/build-info.template'
build_info='meta/build-info.template'
edge_info='meta/edge-info.template'
tag=$(git describe --tags --abbrev=0)
changelog_line=$(grep "$tag" CHANGELOG.md)
changelog_date=$(echo "$changelog_line" | grep -Eo '\d{4}-\d{2}-\d{2}')
Expand All @@ -14,8 +15,14 @@ make_info_for_browser() {
-e "s/VERSION_NUMBER/$tag/g" \
-e "s/BROWSER_PRETTY/$browser_pretty/g" \
-e "s/BROWSER_VAR/$browser_var/g" \
< $in
}
< $build_info
}

make_info_for_edge() {
sed \
-e "s/CHANGELOG_ANCHOR/$changelog_anchor/g" \
< $edge_info
}

echo // Firefox
echo
Expand All @@ -27,11 +34,21 @@ echo
make_info_for_browser Opera opera
echo
echo
echo // Edge
echo
make_info_for_edge
echo
echo

github_zip_file=$tag.zip
github_code_url="https://github.com/matatk/landmarks/archive/$github_zip_file"
echo "Downloading <$github_code_url>..."
curl \
--location "$github_code_url" \
--remote-name \
--remote-header-name
local_source_file="landmarks-$github_zip_file"
if [ ! -f "$local_source_file" ]; then
echo "Downloading <$github_code_url>..."
curl \
--location "$github_code_url" \
--remote-name \
--remote-header-name
else
echo "$local_source_file already exists; skipping download"
fi

0 comments on commit 70bcb6c

Please sign in to comment.