-
Notifications
You must be signed in to change notification settings - Fork 10
/
Taskfile.yml
72 lines (60 loc) · 1.88 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3'
env:
BUNDLE_PATH: .vendor
vars:
GIT_DESCRIBE:
sh: git describe --tags --dirty --always
GEM_VERSION:
sh: ruby -e "if Gem::Version.new(ARGV[0]).prerelease? then puts Gem::Version.new(Gem::Version.new(ARGV[0].split('-')[0]).bump().to_s + '-' + ARGV[0].split('-')[1..].join('.')) else puts Gem::Version.new(ARGV[0]) end" {{.GIT_DESCRIBE}}
GEM_NAME: jekyll-rdf
DOCKER_IMAGE: aksw/jekyll-rdf
tasks:
default:
desc: The list of all defined tasks
cmds:
- task -a
info:
desc: Output some variables
cmds:
- |
echo "GIT_DESCRIBE: {{.GIT_DESCRIBE}}"
echo "GEM_VERSION: {{.GEM_VERSION}}"
echo "GEM_NAME: {{.GEM_NAME}}"
echo "DOCKER_IMAGE: {{.DOCKER_IMAGE}}"
install:
desc: Install jekyll rdf and its dependencies with bundle
cmds:
- bundle install
gem:build:
desc: Build the ruby gem
cmds:
- gem build {{.GEM_NAME}}.gemspec
gem:push:
desc: Push the gem to rubygems.org
cmds:
- gem push {{.GEM_NAME}}-{{.GEM_VERSION}}.gem
image:build:
desc: Build the docker image for the current version
aliases: [podman:build, docker:build]
cmds:
- docker build --no-cache --build-arg VERSION={{.GEM_VERSION}} -t {{.DOCKER_IMAGE}}:{{.GEM_VERSION}} .
test:
desc: Run the tests
deps:
- task: test:setup
cmds:
- bundle exec rake test
test:setup:
desc: Setup the test environment
cmds:
- task: test:setup:endpoint-container
- |
cd test/theme-gem
bundle install
- bundle install
test:setup:endpoint-container:
desc: Start a saprql endpoint for the tests
cmds:
- docker run --rm -d -p 3030:3030 --name jekyll_rdf_test_endpoint stain/jena-fuseki:4.8.0 ./fuseki-server --mem /remote
status:
- '[ "$( docker inspect --format "{{`{{.State.Running}}`}}" jekyll_rdf_test_endpoint )" = "true" ]'