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

Add scripts for generating and verifying SHA 512 checksums #2168

Merged
merged 8 commits into from
Apr 9, 2021
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
4 changes: 2 additions & 2 deletions app/core/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import contractMap from '@metamask/contract-metadata';
import Logger from '../util/Logger';
import { LAST_INCOMING_TX_BLOCK_INFO } from '../constants/storage';

const EMPTY = 'EMPTY';
const NON_EMPTY = 'NON_EMPTY';

const encryptor = new Encryptor();
let currentChainId;
Expand Down Expand Up @@ -79,7 +79,7 @@ class Engine {
new PersonalMessageManager(),
new MessageManager(),
new NetworkController({
infuraProjectId: process.env.MM_INFURA_PROJECT_ID || EMPTY,
infuraProjectId: process.env.MM_INFURA_PROJECT_ID || NON_EMPTY,
providerConfig: {
static: {
eth_sendTransaction: async (payload, next, end) => {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"build:announce": "node ./scripts/metamask-bot-build-announce.js",
"build:android:release": "./scripts/build.sh android release",
"build:android:release:e2e": "./scripts/build.sh android releaseE2E",
"build:android:checksum": "./scripts/checksum.sh",
"build:android:checksum:verify": "shasum -a 512 -c sha512sums.txt",
"build:android:pre-release": "./scripts/build.sh android release --pre",
"build:android:pre-release:bundle": "GENERATE_BUNDLE=true ./scripts/build.sh android release --pre",
"build:ios:release": "./scripts/build.sh ios release",
Expand Down
2 changes: 2 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ buildAndroidRelease(){
if [ "$PRE_RELEASE" = true ] ; then
# Generate sourcemaps
yarn sourcemaps:android
# Generate checksum
yarn build:android:checksum
fi

if [ "$PRE_RELEASE" = false ] ; then
Expand Down
7 changes: 7 additions & 0 deletions scripts/checksum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

FILE=./android/app/build/outputs/apk/release/app-release.apk

if test -f "$FILE"; then
shasum -a 512 "$FILE" > ./android/app/build/outputs/apk/release/sha512sums.txt
fi;