Skip to content

Commit

Permalink
Check README is up to date on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed May 22, 2024
1 parent 37e920b commit 29bc9bc
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
- uses: erlef/setup-beam@v1
with:
otp-version: "26.0.2"
gleam-version: "0.34.1"
gleam-version: "1.1.0"
rebar3-version: "3"
# elixir-version: "1.15.4"
- run: gleam deps download
- run: gleam test
- run: gleam format --check src test
- run: gleam run check
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ Looking for something to build? Check out [the suggestions list][suggestions].

### Numbers

- [bigi](https://gitlab.com/Nicd/bigi) - [📚](https://hexdocs.pm/bigi/) - Arbitrary precision integer arithmetic for Gleam
- [gleam_community_maths](https://github.com/gleam-community/maths) - [📚](https://hexdocs.pm/gleam_community_maths/) - A basic maths library

### Parsing
Expand Down
1 change: 1 addition & 0 deletions gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gleam_httpc = "~> 2.1"
tom = "~> 0.3"
sqlight = "~> 0.9"
gleam_http = "~> 3.5"
argv = ">= 1.0.2 and < 2.0.0"

[dev-dependencies]
gleeunit = "~> 1.0"
4 changes: 3 additions & 1 deletion manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# You typically do not need to edit this file

packages = [
{ name = "argv", version = "1.0.2", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "BA1FF0929525DEBA1CE67256E5ADF77A7CDDFE729E3E3F57A5BDCAA031DED09D" },
{ name = "esqlite", version = "0.8.6", build_tools = ["rebar3"], requirements = [], otp_app = "esqlite", source = "hex", outer_checksum = "607E45F4DA42601D8F530979417F57A4CD629AB49085891849302057E68EA188" },
{ name = "gleam_http", version = "3.5.3", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_http", source = "hex", outer_checksum = "C2FC3322203B16F897C1818D9810F5DEFCE347F0751F3B44421E1261277A7373" },
{ name = "gleam_httpc", version = "2.1.2", build_tools = ["gleam"], requirements = ["gleam_http", "gleam_stdlib"], otp_app = "gleam_httpc", source = "hex", outer_checksum = "ACD05CA3BAC7780DF5FFAE334621FD199D1B490FAF6ECDFF74316CAA61CE88E6" },
Expand All @@ -13,7 +14,8 @@ packages = [
]

[requirements]
gleam_http = { version = "~> 3.5"}
argv = { version = ">= 1.0.2 and < 2.0.0"}
gleam_http = { version = "~> 3.5" }
gleam_httpc = { version = "~> 2.1" }
gleam_stdlib = { version = "~> 0.34 or ~> 1.0" }
gleeunit = { version = "~> 1.0" }
Expand Down
2 changes: 1 addition & 1 deletion packages/bigi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name = "bigi"
description = "Arbitrary precision integer arithmetic for Gleam"
docs_url = "https://hexdocs.pm/bigi/"
repo_url = "https://gitlab.com/Nicd/bigi"
category = ""
category = "Numbers"
5 changes: 5 additions & 0 deletions packages/cake.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "cake"
description = "An SQL query builder for Gleam targeting Postgres and SQLite - a preview"
docs_url = "https://hexdocs.pm/cake/"
repo_url = "https://github.com/inoas/gleam-cake"
category = ""
5 changes: 5 additions & 0 deletions packages/event_hub.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "event_hub"
description = "Event-Hub is a Gleam library that provides simple hubs with publishers and subscribers for event-driven observers. It supports asynchronous message handling and event notifications, decoupling components efficiently. It works on Erlang and JavaScript."
docs_url = "https://hexdocs.pm/event_hub/"
repo_url = "https://github.com/yerTools/event_hub"
category = ""
5 changes: 5 additions & 0 deletions packages/geny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "geny"
description = "Error handling library for gleam language"
docs_url = "https://hexdocs.pm/geny/"
repo_url = "https://github.com/jedsek/geny"
category = ""
5 changes: 5 additions & 0 deletions packages/hardcache.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "hardcache"
description = "Gleam module that provides primitives for caching key-value pairs in files and using files as caches."
docs_url = "https://hexdocs.pm/hardcache/"
repo_url = "https://github.com/katekyy/hardcache"
category = ""
5 changes: 5 additions & 0 deletions packages/html_lustre_converter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "html_lustre_converter"
description = "Convert regular HTML markup into Lustre syntax"
docs_url = "https://hexdocs.pm/html_lustre_converter/"
repo_url = "https://github.com/lpil/html_lustre_converter"
category = ""
5 changes: 5 additions & 0 deletions packages/palindrome.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "palindrome"
description = "A simple Gleam project that checks if a string is a palindrome."
docs_url = "https://hexdocs.pm/palindrome/"
repo_url = "https://github.com/nkpgardose/palindrome"
category = ""
5 changes: 5 additions & 0 deletions packages/ygleam.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "ygleam"
description = "Yjs Gleam Bindings"
docs_url = "https://hexdocs.pm/ygleam/"
repo_url = "https://github.com/weedonandscott/gleam_yjs"
category = ""
19 changes: 17 additions & 2 deletions src/awesome.gleam
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import argv
import gleam/bool
import gleam/dict
import gleam/dynamic.{type Dynamic}
Expand Down Expand Up @@ -146,8 +147,22 @@ Websites with Gleam related content.
* [r/gleamlang](https://reddit.com/r/gleamlang/)
"

io.println("Writing REAME")
let assert Ok(_) = simplifile.write("README.md", markdown)
case argv.load().arguments == ["check"] {
True -> {
io.println("Checking README")
let assert Ok(current) = simplifile.read("README.md")
case current == markdown {
True -> Nil
False ->
panic as "README is out of sync with packages/*.toml config files"
}
}
False -> {
io.println("Writing README")
let assert Ok(_) = simplifile.write("README.md", markdown)
Nil
}
}

io.println("Done! ✨")
}
Expand Down

0 comments on commit 29bc9bc

Please sign in to comment.