Skip to content

Commit

Permalink
Merge pull request #447 from genedna/main
Browse files Browse the repository at this point in the history
Add git submodule init command in development.md and add buck config …
  • Loading branch information
benjamin-747 authored Jul 10, 2024
2 parents d4dfe9f + f127afa commit c86ce9d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
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",
)

1 comment on commit c86ce9d

@vercel
Copy link

@vercel vercel bot commented on c86ce9d Jul 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mega – ./

mega-git-main-gitmono.vercel.app
gitmega.dev
mega-gitmono.vercel.app
www.gitmega.dev

Please sign in to comment.