Skip to content

Commit adf86a5

Browse files
committed
matlab mark
2 parents 7c839be + faf66c3 commit adf86a5

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Build MacOS
1+
This is a Haskell script that transforms the resources from [ingun37/answers-db](https://github.com/ingun37/answers-db) into the static assets for the website [ingun37/answers](https://github.com/ingun37/answers). The nix build cache is pushed to the `inguncache` Cachix in the CI/CD here, and pulled from the CI/CD of the **answers** web app. Check out the github workflow files of both projects for the details.
2+
3+
# Build manually on MacOS
24

35
```sh
46
# for building gitlib packages
@@ -12,10 +14,16 @@ ln -s $(brew --prefix openssl@3)/3.5.2 /usr/local/opt/openssl
1214
echo "export PKG_CONFIG_PATH=\"$(brew --prefix)/opt/icu4c/lib/pkgconfig\"" >> ~/.zprofile
1315
```
1416

17+
## Build
1518
```sh
1619
cabal build
1720
```
1821

22+
## Run Unit test
23+
```sh
24+
cabal test
25+
```
26+
1927
# Data flow
2028

2129
```mermaid
@@ -38,14 +46,16 @@ flowchart LR
3846

3947
# CI/CD
4048

49+
## Update gitlib sha1
50+
4151
Check the sha1 of gitlib like this
4252

4353
```sh
44-
nix-shell -p nix-prefetch-git
54+
nix-shell -p nix-prefetch-git
4555
nix-prefetch-git https://github.com/jwiegley/gitlib.git bf256617179d853bdbc12e9283b3f570ebb9d9d7 --fetch-submodules
4656
```
4757

48-
Output is like
58+
Output will look like this
4959

5060
```
5161
git revision is bf256617179d853bdbc12e9283b3f570ebb9d9d7
@@ -69,4 +79,4 @@ hash is 13k3aymqwzpcijnjjka820nv6rkgakzbvh13glw98p1c4yhqwcbf
6979
}
7080
```
7181

72-
Use the "sha256" for the `--sha256` field in the `cabal.project`.
82+
Use the "sha256" for the `--sha256` field in the `cabal.project`.

answers-script.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ test-suite answers-script-test
157157
attoparsec,
158158
cmark,
159159
cmark-lens,
160-
directory
160+
directory

app/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ main =
8787
<> progDesc "Collection of utility functions for the Answers web app"
8888
<> header "Collection of utility functions for the Answers web app"
8989
)
90-
)
90+
)

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ source-repository-package
2424
source-repository-package
2525
type: git
2626
location: https://github.com/ingun37/cmark-lens.git
27-
tag: 4456f10deccb61419ce28811db448c266931190f
27+
tag: 4456f10deccb61419ce28811db448c266931190f

test/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ matlab =
5858
b <- DT.readDirectoryWith TIO.readFile ("test" F.</> "matlab-expect")
5959
let b' = b ^.DT._dirTree
6060
let b'' = DT.flattenDir (set DT._name "" b')
61-
zipWithM_ shouldBe a'' b''
61+
zipWithM_ shouldBe a'' b''

0 commit comments

Comments
 (0)