Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
yujin512 committed Sep 17, 2024
2 parents 4da88ab + e041ff0 commit 3d29753
Show file tree
Hide file tree
Showing 106 changed files with 11,968 additions and 9,889 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate-other-market-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: 'dydxprotocol/v4-chain'
ref: '5e7bf529424a55d69edbaedf6c8a52674e06d0c1'
ref: '725ad716cbe9e9aebf2472e877fe2a71e8a63d87'
path: 'v4-chain'

- name: Start v4 localnet
Expand Down
52 changes: 52 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Get the current branch
branch=$(git rev-parse --abbrev-ref HEAD)
echo "Branch name: $branch"

# Get the local SHA (the latest commit on the local branch)
local_sha=$(git rev-parse "$branch")
echo "Local sha: $local_sha"

# Get the remote SHA (the latest commit on the remote branch, if it exists)
remote_sha=$(git ls-remote origin "$branch" | awk '{print $1}' | head -n 1)
echo "Remote sha: $remote_sha"

# Get the SHA of the main branch on the remote
main_sha=$(git rev-parse main)
echo "Main sha: $main_sha"

if [ -z "$remote_sha" ]; then
# If the remote branch doesn't exist (new branch)
range="$main_sha..$local_sha"
echo "Remote branch doesn't exist. Using range: $range"
else
# Check the range between the remote and local branches
range="$remote_sha..$local_sha"
echo "Range of commits to check: $range"
fi

# Ensure the range is valid
if [ -z "$range" ] || ! git rev-parse "$range" >/dev/null 2>&1; then
echo "No valid commits to check or invalid range."
exit 1
fi

# Get the list of unsigned commits in the range
echo "Checking commits for signatures..."
unsigned_commits=$(git rev-list --no-merges "$range" | while read commit; do
if ! git log --show-signature -1 "$commit" | grep -q "gpg: Signature made"; then
echo "Error, unsigned commit: $commit"
echo "$commit"
fi
done)
# If there are unsigned commits, reject the push
if [ -n "$unsigned_commits" ]; then
echo "Error: The following commits are not signed:"
echo "$unsigned_commits"
exit 1
fi
# All
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"build:inject-smartbanner": "node scripts/inject-smartbanner.js",
"build:set-last-commit-and-tag": "sh scripts/set-last-commit-and-tag.sh",
"build:generate-entry-points": "node scripts/generate-entry-points.js",
"assets": "node scripts/check-assets.js",
"deploy:ipfs": "node scripts/upload-ipfs.js --verbose",
"deploy:update-ipns": "node scripts/update-ipns.js",
"deploy:update-dnslink": "node scripts/update-dnslink.js",
Expand Down Expand Up @@ -53,9 +54,9 @@
"@cosmjs/stargate": "^0.32.1",
"@cosmjs/tendermint-rpc": "^0.32.1",
"@datadog/browser-logs": "^5.23.3",
"@dydxprotocol/v4-abacus": "1.9.10",
"@dydxprotocol/v4-abacus": "1.11.5",
"@dydxprotocol/v4-client-js": "^1.1.27",
"@dydxprotocol/v4-localization": "^1.1.191",
"@dydxprotocol/v4-localization": "^1.1.196",
"@emotion/is-prop-valid": "^1.3.0",
"@ethersproject/providers": "^5.7.2",
"@hugocxl/react-to-image": "^0.0.9",
Expand Down
Loading

0 comments on commit 3d29753

Please sign in to comment.