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 git submodule init command in development.md and add buck config … #447

Merged
merged 1 commit into from
Jul 10, 2024
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
16 changes: 16 additions & 0 deletions .buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[cells]
root = .
prelude = prelude
toolchains = toolchains
none = none

[cell_aliases]
config = prelude
ovr_config = prelude
fbcode = none
fbsource = none
fbcode_macros = none
buck = none

[parser]
target_platform_detector_spec = target:root//...->prelude//platforms:default
Empty file added .buckroot
Empty file.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ Cargo.lock

# Mac
.DS_Store
.VSCodeCounter# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
.VSCodeCounter

# zmt agent data file
ztm_agent.db
ztm_agent.db

# buck2 out
buck-out
10 changes: 6 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
```bash
$ git clone https://github.com/web3infra-foundation/mega.git
$ cd mega
$ git submodule update --init --recursive
$ cargo build
```

Expand Down Expand Up @@ -183,12 +184,13 @@
```bash
$ git clone https://github.com/web3infra-foundation/mega.git
$ cd mega
$ git submodule update --init --recursive
$ cargo build
```

3. Install PostgreSQL and initialize database.

1. Install PostgreSQL.
1.Install PostgreSQL.

```bash
$ pacman -S postgresql
Expand All @@ -199,7 +201,7 @@
$ systemctl enable --now postgresql
```

2. Create database.
2.Create database.

```bash
$ sudo -u postgres psql postgres
Expand All @@ -212,14 +214,14 @@
postgres=# \q
```

3. Import `mega/sql/postgres/pg_<time>_init.sql` to `mega`.
3.Import `mega/sql/postgres/pg_<time>_init.sql` to `mega`.

```bash
$ cd mega/sql/postgres
$ sudo -u postgres psql mega < pg_20240205__init.sql
```

4. Create user and grant privileges.
4.Create user and grant privileges.

```sql
$ sudo -u postgres psql postgres
Expand Down
5 changes: 5 additions & 0 deletions mega/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rust_binary(
name = "mega",
srcs = glob(["src/**/*.rs"]),
crate_root = "src/main.rs",
)
Loading