diff --git a/.gitignore b/.gitignore index 89f9ac0..96426ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ out/ +examples/ +compile_commands.json +.cache/ diff --git a/Makefile b/Makefile index 94794b6..a93b18d 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ OBJ = $(SRC:.c=.o) OUTDIR := out/ OBJDIR := out/obj BINDIR := out/bin +CFLAGS += -DSCI_VERSION="\"$(VERSION)\"" -DSCI_NAME="\"$(NAME)\"" +CFLAGS += -Wall -Werror .PHONY: all clean diff --git a/README.md b/README.md index a11a4aa..bf5802f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Suckless Continous Integration +# Suckless/Simple Continous Integration Jenkins, Travis, GitHub Actions, GitLab CI. The list goes on. This is a minimal tool for fulfilling the CI (Continous Integration) use case. @@ -70,3 +70,12 @@ What language should I implement `scid` in? - `java` slow devtime, bloated. No. - `rust` slow devtime (not familiar), great tooling, too many risks for a first prototype. No. - `shell` quick, easy, instant spaghetti. No. + +I choose `c`! + +I also choose `Makefile`s! - Just to force myself to use another build system than CMake! +If you want `compile_commands.json` files, you should use [bear](https://github.com/rizsotto/Bear) as it works well + +### Progress + - [ ] Zeroth things first, let's create a simple CLI application with `--verbosity VAL` and `--help` options. + - [ ] First things first, let's implement something that reacts when some provided file changes. diff --git a/src/main.c b/src/main.c index 0205b00..a4d5cb1 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,64 @@ #include +#include +#include +#include +#include + +struct cli_options { + int verbosity; + bool help; + bool version; +}; + +struct cli_options new_options() { + struct cli_options result; + result.verbosity = 0; + result.help = false; + return result; +} + +//