-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
48 lines (39 loc) · 1.16 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
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-theme-jod
DOCKER_IMAGE: eccenca/jod
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
docker:build:
desc: Build the docker image
cmds:
- docker build --no-cache -t {{.DOCKER_IMAGE}}:{{.GEM_VERSION}} .