-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.just
More file actions
76 lines (51 loc) · 1.59 KB
/
main.just
File metadata and controls
76 lines (51 loc) · 1.59 KB
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
73
74
75
76
# aia/main.just
#
RR := env_var('RR')
version_filepath := env_var('RR') + "/.version"
with ~/.justfile
# FIXME: justprep module process still has an issue with ~ and $HOME
# FIXME: justprep does not like more than one space between module name and path.
module repo /Users/dewayne/sandbox/git_repos/repo.just
module gem /Users/dewayne/sandbox/git_repos/gem.just
module version /Users/dewayne/just_modules/version_versionaire.just
module git /Users/dewayne/just_modules/git.just
# Install Locally
install: update_toc_in_readmen flay
rake install
# Create the TOC
update_toc_in_readmen:
rake toc
# Static Code Check
flay: coverage
flay {{RR}}
# View coverage report
coverage: test
open {{RR}}/coverage/index.html
# Run Unit Tests
test:
rake test
# Generate the Documentation
gen_doc: update_toc_in_readmen
##########################################
# Tag the current commit, push it, then bump the version
tag_push_and_bump: tag push bump
# Create a git tag for the current version
tag:
git tag v`head -1 {{version_filepath}}`
# Push the git current working directory and all tags
push:
git push
git push origin --tags
alias inc := bump
# Increment version's level: major.minor.patch
@bump level='patch':
#!/usr/bin/env ruby
require 'versionaire'
old_version = Versionaire::Version File.read("{{version_filepath}}").strip
level = "{{level}}".to_sym
new_version = old_version.bump level
puts "Bumping #{level}: #{old_version} to #{new_version}"
File.open("{{version_filepath}}", 'w')
.write(new_version.to_s + "\n")
#
`git add {{version_filepath}}`