forked from MartinPham/smartcontract-ui
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update and build chain data from chainlist.org via git submodul…
…e, enable explorer in frame via config per chain
- Loading branch information
Showing
78 changed files
with
10,915 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh - | ||
. $(dirname "$0")/env.sh | ||
|
||
yarn install --prefer-offline --pure-lockfile --cache-folder .yarn --modules-folder node_modules | ||
|
||
echo "[BUILD] Clean built files ($BUILD_DIR)" | ||
rm -rf $BUILD_DIR | ||
echo "[BUILD] Cleaned" | ||
|
||
echo "[BUILD] Building" | ||
yarn build | ||
echo "[BUILD] Built" | ||
|
||
echo "[BUILD] Copy runtime files" | ||
mv out $BUILD_DIR | ||
echo "[BUILD] Copied" |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh - | ||
. $(dirname "$0")/env.sh | ||
|
||
echo "[CI-RELEASE] Preparing files.." | ||
rm -rf $BUILD_DIR/.gitlab-ci.yml | ||
mv public public-org | ||
mv $BUILD_DIR public | ||
echo "[CI-RELEASE] Done" |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh - | ||
|
||
echo "[ENV] Set build dir" | ||
export BUILD_DIR=.build | ||
|
||
echo "[ENV] Set release dir" | ||
export RELEASE_DIR=.release | ||
|
||
echo "[ENV] Set git data" | ||
export GIT_BRANCH=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD) | ||
export GIT_BUILD_BRANCH=$GIT_BRANCH-build | ||
export GIT_COMMIT=$(git rev-parse --short HEAD) |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh - | ||
. $(dirname "$0")/env.sh | ||
|
||
echo "[RELEASE] Clean released files ($RELEASE_DIR)" | ||
rm -rf $RELEASE_DIR | ||
echo "[RELEASE] Cleaned" | ||
|
||
echo "[RELEASE] Pushing current working tree.." | ||
(git add -A ; git commit -m "Manual build" ; git push origin $GIT_BRANCH) || (echo "Working tree clean") | ||
echo "[RELEASE] Pushed ($GIT_BRANCH/$GIT_COMMIT).." | ||
|
||
. $(dirname "$0")/build.sh | ||
|
||
echo "[RELEASE] Syncing build files from $GIT_BUILD_BRANCH.." | ||
rm -rf $RELEASE_DIR | ||
mkdir $RELEASE_DIR | ||
mv .git $RELEASE_DIR/.git | ||
cd $RELEASE_DIR ; git branch -D $GIT_BUILD_BRANCH ; (git checkout $GIT_BUILD_BRANCH) || (git checkout -b $GIT_BUILD_BRANCH) ; git stash && git stash drop; (git pull --depth 1 origin $GIT_BUILD_BRANCH --rebase --allow-unrelated-histories) || (echo "Build files synced") ; cd .. | ||
echo "[RELEASE] Synced" | ||
|
||
echo "[RELEASE] Pushing build files.." | ||
mv $RELEASE_DIR/.git . ; rm -rf $RELEASE_DIR ; cp -r $BUILD_DIR $RELEASE_DIR ; mv .git $RELEASE_DIR/.git | ||
cd $RELEASE_DIR ; touch .nojekyll ; git add -A ; git commit -m "Manual build $GIT_COMMIT" ; git push origin $GIT_BUILD_BRANCH ; git checkout $GIT_BRANCH ; git branch -D $GIT_BUILD_BRANCH ; cd .. | ||
echo "[RELEASE] Pushed" | ||
|
||
echo "[RELEASE] Switch back to $GIT_BRANCH.." | ||
mv $RELEASE_DIR/.git . | ||
echo "[RELEASE] Switched" |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = false | ||
|
||
|
||
indent_style = tab | ||
indent_size = 2 | ||
|
||
[*.{js,php,html,css,py,twig,less,scss,jsx,ts,tsx}] | ||
charset = utf-8 | ||
|
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Deploy to Pages | ||
|
||
env: | ||
ASSET_PREFIX: "/" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths-ignore: | ||
- ".gitlab-ci.yml" | ||
- ".gitlab-ci-disabled.yml" | ||
- "README.md" | ||
- "COPYING" | ||
- "docs/**" | ||
|
||
jobs: | ||
build-push: | ||
name: "Build & Push" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [lts/*] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Cache deps | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
./node_modules | ||
./.yarn | ||
./.next/cache | ||
key: ${{ runner.os }}-modules-${{ hashFiles('./yarn.lock') }} | ||
|
||
- name: Build & Push | ||
run: | | ||
git config --global user.name $GITHUB_ACTOR | ||
git config --global user.email $GITHUB_ACTOR@users.noreply.github.com | ||
export NEXT_TELEMETRY_DISABLED=1 | ||
./.ci/release.sh | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: ./.build |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.yarn | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Next.js | ||
/.next | ||
/out |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
stages: | ||
- build | ||
- pages | ||
|
||
build: | ||
stage: build | ||
image: node:lts | ||
cache: | ||
key: ${CI_COMMIT_REF_SLUG} | ||
paths: | ||
- ./node_modules | ||
- ./.yarn | ||
- ./.next/cache | ||
artifacts: | ||
paths: | ||
- .build/ | ||
expire_in: 1 day | ||
script: | ||
- export NEXT_TELEMETRY_DISABLED=1 | ||
- ./.ci/build.sh | ||
|
||
pages: | ||
stage: pages | ||
image: | ||
name: alpine:latest | ||
entrypoint: [""] | ||
cache: {} | ||
artifacts: | ||
paths: | ||
- public | ||
|
||
script: | ||
- ./.ci/ci-release.sh | ||
- ls -la public | ||
|
||
only: | ||
- main |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "config/chainlist"] | ||
path = config/chainlist | ||
url = https://github.com/ethereum-lists/chains.git |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"editor.tabSize": 2, | ||
"json.format.enable": true | ||
} |
Oops, something went wrong.