middlesite 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTIwNTMzNWMxMjQ5ZGMxN2Q3ZDNkOWNmNTBlMTk5NmIxODc1MDVkYg==
4
+ MzJkZDNkMWYxZDIzZDI3ZjJjNTRkMWNjMjRlOGQ5NDVjNDE4ZTM1NQ==
5
5
  data.tar.gz: !binary |-
6
- ZDJjNTA2MmQ1NWM1ZDQxOWMzODhhMzA0YjQzM2NjOWY3YTk3OTJkOA==
6
+ N2UwYzhjYTZkNzFkY2VmOWNjMWY2NThiMDMxNmQ3ZTQwZGYzMDkwYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDVlNjc1NmNhNzNhZTgzMjYxNWEzMDdiZjBhOTZjNDE5ZDRhOWY4ZTBhOTYw
10
- Y2UxZmRiZGExZjJhODMzMGM0ODQ1MTFiZDUyYTA0MjVjOTNlMzJlODQwZGY0
11
- YmFkNDk0N2UwMTczMjNmZjdmZDYzMTc5YTBjZjdhMTdjNGZkMTQ=
9
+ M2VkNDVmMTY3M2U5NmQzZmM2ZjhmYWRhNDY4YTcxYjE1YWIyOTc5NjRmN2U4
10
+ ZGVjMDQyNzE1MGUwNzBmZjFhOGExZGJhODU5YmNhMjg1ODY3Y2RlOWQ1OWJi
11
+ MTJiMDlhMzNjMjczNDUwMzBjZTZjYjRiMWNiMzdiNjEzZDI4ZWM=
12
12
  data.tar.gz: !binary |-
13
- ZjY1YTZiOWE2YTM2MTIzMjE4NjkyYzU1Y2E2YjRkOTU5MWQ4NmE3NDM5NWM1
14
- MzQ4NzIwOTc5ZjBmYjViOGRhZWRmZDYwZjY5YTkzZmMwNjg3OGE2MTAzMTY5
15
- MjQ0N2MwMDdiZDBhMjZhN2UwMGViZmFlOGZkMGNlNTYzOTk1Njg=
13
+ YTQ0OGJiMzVlZTZlYTE5MTk5MDBlMGYyNWJhMTEyYjhmMjk4ODI0MGJlNjhi
14
+ YjRhMmYxZTMxMGMwMGRiNzJjZmU4NDEyNmUyYTA0MWY4MzY5ZjI4NWRmNGJk
15
+ OTc4Njk2YWYzYjM0YmQ2MGQ3OGE4OTgwNDdmNTE1MjlkMGUzYzg=
data/README.md CHANGED
@@ -7,9 +7,26 @@
7
7
  ```
8
8
  $ gem install middlesite
9
9
  ```
10
-
11
10
  ## Usage
12
11
 
12
+ This tool requires a `site.yml` file in the `data` directory:
13
+
14
+ ```
15
+ .
16
+ ├── Gemfile
17
+ ├── README.md
18
+ ├── config.rb
19
+ ├── data
20
+ │   └── site.yml
21
+ └── source
22
+ ```
23
+ The `site.yml` file should contain the variable `version` which can be used in your templates as well:
24
+
25
+ ```
26
+ ---
27
+ version: 0.1.0
28
+ ```
29
+
13
30
  The following tasks are available trough the command line.
14
31
 
15
32
  ```
@@ -40,24 +40,25 @@ module Middlesite
40
40
  raise Thor::Error, "Not a git repository!" unless Dir.exists?(".git")
41
41
  g = ::Git.open(".")
42
42
  raise Thor::Error, "Uncommitted git changes!" unless g.status.changed.empty?
43
- tags = g.tags
44
- raise Thor::Error, "No tag found!" if tags.empty?
45
- tag = tags.pop().name
43
+
44
+ config = get_config()
45
+ version = config["version"]
46
46
 
47
47
  # Bump version
48
48
  case type
49
49
  when "major"
50
- version = bump_major(tag)
50
+ version = bump_major(version)
51
51
  when "minor"
52
- version = bump_minor(tag)
52
+ version = bump_minor(version)
53
53
  when "patch"
54
- version = bump_patch(tag)
54
+ version = bump_patch(version)
55
+ else
56
+ raise Thor::Error, "Unknown bump type!"
55
57
  end
56
58
  puts "Bumping version to: #{version}"
57
59
 
58
60
  # update config
59
61
  puts "Updating site config..."
60
- config = get_config()
61
62
  config["version"] = version
62
63
  set_config(config)
63
64
 
@@ -1,3 +1,3 @@
1
1
  module Middlesite
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middlesite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - franklin