-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/linea-token-detection
- Loading branch information
Showing
787 changed files
with
39,170 additions
and
21,141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,37 +26,42 @@ function install_github_cli () | |
popd | ||
} | ||
|
||
function print_flask_version () | ||
function print_build_version () | ||
{ | ||
local flask_filename | ||
flask_filename="$(find ./builds-flask -type f -name 'metamask-flask-chrome-*.zip' -exec basename {} .zip \;)" | ||
local build_type="${1}"; shift | ||
|
||
local flask_build_filename_prefix | ||
flask_build_filename_prefix='metamask-flask-chrome-' | ||
local flask_build_filename_prefix_size | ||
flask_build_filename_prefix_size="${#flask_build_filename_prefix}" | ||
local filename | ||
filename="$(find "./builds-${build_type}" -type f -name "metamask-${build_type}-chrome-*.zip" -exec basename {} .zip \;)" | ||
|
||
local build_filename_prefix | ||
build_filename_prefix="metamask-${build_type}-chrome-" | ||
local build_filename_prefix_size | ||
build_filename_prefix_size="${#build_filename_prefix}" | ||
|
||
# Use substring parameter expansion to remove the filename prefix, leaving just the version | ||
echo "${flask_filename:$flask_build_filename_prefix_size}" | ||
echo "${filename:$build_filename_prefix_size}" | ||
} | ||
|
||
function publish_flask_tag () | ||
|
||
function publish_tag () | ||
{ | ||
local flask_version="${1}"; shift | ||
local build_name="${1}"; shift | ||
local build_version="${1}"; shift | ||
|
||
git config user.email "[email protected]" | ||
git config user.name "MetaMask Bot" | ||
git tag -a "v${flask_version}" -m "Flask version ${flask_version}" | ||
git tag -a "v${build_version}" -m "${build_name} version ${build_version}" | ||
repo_slug="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" | ||
git push "https://$GITHUB_TOKEN@github.com/$repo_slug" "v${flask_version}" | ||
git push "https://$GITHUB_TOKEN@github.com/$repo_slug" "v${build_version}" | ||
} | ||
|
||
current_commit_msg=$(git show -s --format='%s' HEAD) | ||
|
||
if [[ $current_commit_msg =~ Version[-[:space:]](v[[:digit:]]+.[[:digit:]]+.[[:digit:]]+) ]] | ||
then | ||
tag="${BASH_REMATCH[1]}" | ||
flask_version="$(print_flask_version)" | ||
flask_version="$(print_build_version 'flask')" | ||
mmi_version="$(print_build_version 'mmi')" | ||
|
||
install_github_cli | ||
|
||
|
@@ -67,12 +72,15 @@ then | |
--attach builds/metamask-firefox-*.zip \ | ||
--attach builds-flask/metamask-flask-chrome-*.zip \ | ||
--attach builds-flask/metamask-flask-firefox-*.zip \ | ||
--attach builds-mmi/metamask-mmi-chrome-*.zip \ | ||
--attach builds-mmi/metamask-mmi-firefox-*.zip \ | ||
--message "Version ${tag##v}" \ | ||
--message "$release_body" \ | ||
--commitish "$CIRCLE_SHA1" \ | ||
"$tag" | ||
|
||
publish_flask_tag "${flask_version}" | ||
publish_tag 'Flask' "${flask_version}" | ||
publish_tag 'MMI' "${mmi_version}" | ||
else | ||
printf '%s\n' 'Version not found in commit message; skipping GitHub Release' | ||
exit 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.