Skip to content

Commit

Permalink
🚚 Modularize
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBardon committed Jan 3, 2024
1 parent 1766ae4 commit 54d6b5f
Show file tree
Hide file tree
Showing 36 changed files with 6,201 additions and 249 deletions.
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ then
if [[ $line == *.rs ]]
then
# format file
rustfmt --edition 2021 -l -- $(pwd)/${line:3}
rustfmt --edition 2021 --config-path src -l -- $(pwd)/${line:3}
# add changes
git add $(pwd)/${line:3}
fi
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ on: [push, pull_request]

name: Test

# TODO: Run for all crates

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -36,10 +38,10 @@ jobs:
key: ${{ runner.os }}-${{ matrix.target }}-cargo

- name: Test on ${{ matrix.target }}
working-directory: ./src/orangutan
working-directory: ./src/orangutan-server
run: cargo test

# TODO: Only check code style for one target
- name: Check code style
working-directory: ./src/orangutan
working-directory: ./src/orangutan-server
run: cargo fmt -- --check
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ render-diagrams:
@(echo "\n"'⚠️ Adobe XD diagrams are not exported automatically.'"\n"' Open `*.xd` files and batch export diagrams in SVG format in <./assets/>.')
release:
@(scripts/release.sh)
format:
@(bash .githooks/pre-commit)
18 changes: 18 additions & 0 deletions orangutan.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"search.exclude": {
"src/*/target": true
}
},
"extensions": {
"recommendations": [
"tamasfe.even-better-toml",
"rust-lang.rust-analyzer"
]
}
}
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

SRC=src/orangutan
SRC=src/orangutan-server

VERSION="$(rg 'version = "(\d+\.\d+.\d+)"' -N --replace '$1' "$SRC"/Cargo.toml)"
TAG="v${VERSION:?}"
Expand Down
File renamed without changes.
Loading

0 comments on commit 54d6b5f

Please sign in to comment.