mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Add shellcheck lint (#7392)
* Add shellcheck lint script * Add to build * Add shellcheck lint to main lint task * Put shellcheck in the right place, hopefully? * Fix declared multiple executor types * Add sudo * Address shellcheck warnings * Add test-lint-shellcheck * Add test-lint-shellcheck to workflow * Use correct lint task * output version which could be helpful for debugging * Address PR feedback * consistency++
This commit is contained in:
parent
a26e77c61e
commit
476274474f
@ -22,6 +22,7 @@ workflows:
|
||||
- test-lint:
|
||||
requires:
|
||||
- prep-deps
|
||||
- test-lint-shellcheck
|
||||
- test-e2e-chrome:
|
||||
requires:
|
||||
- prep-deps
|
||||
@ -49,6 +50,7 @@ workflows:
|
||||
- all-tests-pass:
|
||||
requires:
|
||||
- test-lint
|
||||
- test-lint-shellcheck
|
||||
- test-unit
|
||||
- test-unit-global
|
||||
- test-mozilla-lint
|
||||
@ -173,6 +175,16 @@ jobs:
|
||||
name: Verify locales
|
||||
command: yarn verify-locales --quiet
|
||||
|
||||
test-lint-shellcheck:
|
||||
docker:
|
||||
- image: circleci/node:10.17-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- run: sudo apt-get install shellcheck
|
||||
- run:
|
||||
name: Shellcheck Lint
|
||||
command: yarn lint:shellcheck
|
||||
|
||||
test-deps:
|
||||
docker:
|
||||
- image: circleci/node:10.17-browsers
|
||||
|
@ -10,7 +10,7 @@ git fetch --tags
|
||||
|
||||
most_recent_tag="$(git describe --tags "$(git rev-list --tags --max-count=1)")"
|
||||
|
||||
git rev-list "${most_recent_tag}"..HEAD | while read commit
|
||||
git rev-list "${most_recent_tag}"..HEAD | while read -r commit
|
||||
do
|
||||
subject="$(git show -s --format="%s" "$commit")"
|
||||
|
||||
|
@ -4,20 +4,20 @@
|
||||
echo "Rolling back to version $1"
|
||||
|
||||
# Checkout branch to increment version
|
||||
git checkout -b version-increment-$1
|
||||
git checkout -b "version-increment-$1"
|
||||
yarn version:bump patch
|
||||
|
||||
# Store the new version name
|
||||
NEW_VERSION=$(cat app/manifest.json | jq -r .version)
|
||||
NEW_VERSION=$(jq -r .version < app/manifest.json)
|
||||
|
||||
# Make sure origin tags are loaded
|
||||
git fetch origin
|
||||
|
||||
# check out the rollback branch
|
||||
git checkout origin/v$1
|
||||
git checkout "origin/v$1"
|
||||
|
||||
# Create the rollback branch.
|
||||
git checkout -b Version-$NEW_VERSION-Rollback-to-$1
|
||||
git checkout -b "Version-$NEW_VERSION-Rollback-to-$1"
|
||||
|
||||
# Set the version files to the next one.
|
||||
git checkout master CHANGELOG.md
|
||||
@ -28,8 +28,8 @@ git commit -m "Version $NEW_VERSION (Rollback to $1)"
|
||||
git push -u origin HEAD
|
||||
|
||||
# Create tag and push that up too
|
||||
git tag v${NEW_VERSION}
|
||||
git push origin v${NEW_VERSION}
|
||||
git tag "v${NEW_VERSION}"
|
||||
git push origin "v${NEW_VERSION}"
|
||||
|
||||
# Cleanup version branch
|
||||
git branch -D version-increment-$1
|
||||
git branch -D "version-increment-$1"
|
||||
|
@ -37,6 +37,7 @@
|
||||
"lint:fix": "eslint . --ext js,json --fix",
|
||||
"lint:changed": "{ git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ; } | grep --regexp='[.]js$' --regexp='[.]json$' | tr '\\n' '\\0' | xargs -0 eslint",
|
||||
"lint:changed:fix": "{ git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ; } | grep --regexp='[.]js$' --regexp='[.]json$' | tr '\\n' '\\0' | xargs -0 eslint --fix",
|
||||
"lint:shellcheck": "shellcheck --version && find . -type f -name '*.sh' ! -path './node_modules/*' -print0 | xargs -0 shellcheck",
|
||||
"verify-locales": "node ./development/verify-locale-strings.js",
|
||||
"mozilla-lint": "addons-linter dist/firefox",
|
||||
"watch": "cross-env METAMASK_ENV=test mocha --watch --require test/setup.js --reporter min --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\"",
|
||||
|
Loading…
Reference in New Issue
Block a user