2024-08-28 21:23:23 +00:00
|
|
|
variables:
|
|
|
|
FLAGS: "-d --error-trace"
|
|
|
|
NAME: "tartrazine"
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
build:
|
|
|
|
default: true
|
|
|
|
dependencies:
|
|
|
|
- src
|
|
|
|
- shard.lock
|
|
|
|
- shard.yml
|
|
|
|
- Hacefile.yml
|
|
|
|
- lexers/*xml
|
|
|
|
- styles/*xml
|
|
|
|
outputs:
|
|
|
|
- bin/{{NAME}}
|
|
|
|
commands: |
|
|
|
|
shards build {{FLAGS}}
|
|
|
|
|
|
|
|
get-deps:
|
|
|
|
dependencies:
|
|
|
|
- shard.yml
|
|
|
|
outputs:
|
|
|
|
- shard.lock
|
|
|
|
commands: |
|
|
|
|
shards install
|
|
|
|
|
|
|
|
build-release:
|
|
|
|
phony: true
|
|
|
|
always_run: true
|
|
|
|
commands: |
|
|
|
|
hace build FLAGS="--release"
|
|
|
|
|
|
|
|
install:
|
|
|
|
phony: true
|
|
|
|
always_run: true
|
|
|
|
dependencies:
|
2024-09-03 07:54:46 +00:00
|
|
|
- bin/tartrazine
|
2024-08-28 21:23:23 +00:00
|
|
|
commands: |
|
2024-08-28 21:58:34 +00:00
|
|
|
rm ${HOME}/.local/bin/{{NAME}}
|
|
|
|
cp bin/hace ${HOME}/.local/bin/{{NAME}}
|
2024-08-28 21:23:23 +00:00
|
|
|
|
|
|
|
static:
|
|
|
|
outputs:
|
2024-08-28 21:58:34 +00:00
|
|
|
- bin/{{NAME}}-static-linux-amd64
|
|
|
|
- bin/{{NAME}}-static-linux-arm64
|
2024-08-28 21:23:23 +00:00
|
|
|
commands: |
|
|
|
|
hace clean
|
|
|
|
./build_static.sh
|
|
|
|
|
|
|
|
test:
|
|
|
|
dependencies:
|
|
|
|
- src
|
|
|
|
- spec
|
|
|
|
- shard.lock
|
|
|
|
- shard.yml
|
|
|
|
commands: |
|
|
|
|
crystal spec -v --error-trace
|
|
|
|
phony: true
|
|
|
|
always_run: true
|
|
|
|
|
|
|
|
lint:
|
|
|
|
dependencies:
|
|
|
|
- src
|
|
|
|
- spec
|
|
|
|
- shard.lock
|
|
|
|
- shard.yml
|
|
|
|
commands: |
|
|
|
|
crystal tool format src/*.cr spec/*.cr
|
2024-08-28 21:42:21 +00:00
|
|
|
ameba --fix
|
2024-08-28 21:23:23 +00:00
|
|
|
always_run: true
|
|
|
|
phony: true
|
|
|
|
|
|
|
|
docs:
|
|
|
|
dependencies:
|
|
|
|
- src
|
|
|
|
- shard.lock
|
|
|
|
- shard.yml
|
|
|
|
- README.md
|
|
|
|
commands: |
|
|
|
|
crystal docs
|
|
|
|
outputs:
|
|
|
|
- docs/index.html
|
|
|
|
|
|
|
|
pre-commit:
|
|
|
|
default: true
|
|
|
|
outputs:
|
|
|
|
- .git/hooks/commit-msg
|
|
|
|
- .git/hooks/pre-commit
|
|
|
|
dependencies:
|
|
|
|
- .pre-commit-config.yaml
|
|
|
|
commands: |
|
|
|
|
pre-commit install --hook-type commit-msg
|
|
|
|
pre-commit install
|
|
|
|
|
|
|
|
clean:
|
|
|
|
phony: true
|
|
|
|
always_run: true
|
|
|
|
commands: |
|
|
|
|
rm -rf shard.lock bin lib
|
|
|
|
|
|
|
|
coverage:
|
|
|
|
dependencies:
|
|
|
|
- src
|
|
|
|
- spec
|
|
|
|
- shard.lock
|
|
|
|
- shard.yml
|
|
|
|
commands: |
|
|
|
|
shards install
|
|
|
|
crystal build -o bin/run_tests src/run_tests.cr
|
|
|
|
rm -rf coverage/
|
|
|
|
mkdir coverage
|
|
|
|
kcov --clean --include-path=./src ${PWD}/coverage ./bin/run_tests
|
|
|
|
outputs:
|
|
|
|
- coverage/index.html
|