middlesite 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +18 -1
- data/lib/middlesite/cli.rb +8 -7
- data/lib/middlesite/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzJkZDNkMWYxZDIzZDI3ZjJjNTRkMWNjMjRlOGQ5NDVjNDE4ZTM1NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2UwYzhjYTZkNzFkY2VmOWNjMWY2NThiMDMxNmQ3ZTQwZGYzMDkwYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2VkNDVmMTY3M2U5NmQzZmM2ZjhmYWRhNDY4YTcxYjE1YWIyOTc5NjRmN2U4
|
10
|
+
ZGVjMDQyNzE1MGUwNzBmZjFhOGExZGJhODU5YmNhMjg1ODY3Y2RlOWQ1OWJi
|
11
|
+
MTJiMDlhMzNjMjczNDUwMzBjZTZjYjRiMWNiMzdiNjEzZDI4ZWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
```
|
data/lib/middlesite/cli.rb
CHANGED
@@ -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
|
-
|
44
|
-
|
45
|
-
|
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(
|
50
|
+
version = bump_major(version)
|
51
51
|
when "minor"
|
52
|
-
version = bump_minor(
|
52
|
+
version = bump_minor(version)
|
53
53
|
when "patch"
|
54
|
-
version = bump_patch(
|
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
|
|
data/lib/middlesite/version.rb
CHANGED