diff --git a/meta/build-info-and-downlaod.sh b/meta/moderator-info-and-source-code.sh similarity index 58% rename from meta/build-info-and-downlaod.sh rename to meta/moderator-info-and-source-code.sh index 7bb1dbed..691df33d 100755 --- a/meta/build-info-and-downlaod.sh +++ b/meta/moderator-info-and-source-code.sh @@ -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}') @@ -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 @@ -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