nanoc-deploying 1.0.1 → 1.0.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 +4 -4
- data/NEWS.md +4 -0
- data/lib/nanoc/deploying/deployers/git.rb +18 -8
- data/lib/nanoc/deploying/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56dfc2781a9a44477cb24abe7e25d93f4bacaa699043d995e0b64217b820353d
|
|
4
|
+
data.tar.gz: 5115f6c3ea59409af645b79f0a8dde7b582a7ffc6a5341e6e0f77b40e6ac322b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25af2f26c24a7eb3380dc1cc0e764b4a00cbb6118d3e42a6487cdd45399261e47f48e9e9828d58889ac6ab5287e55439f00354c80a29d22ddec534c1bc3e01fb
|
|
7
|
+
data.tar.gz: 0f79cb31ec810c6ce992ef113d6122267875785dadfada38beb7aae5bd1fc0f393966c59fa82d89a9aa783f0dea714da1ea994702b7331b06ad225fae9d648aa
|
data/NEWS.md
CHANGED
|
@@ -78,13 +78,15 @@ module Nanoc
|
|
|
78
78
|
raise Errors::BranchDoesNotExist.new(branch)
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
# Commit (if needed)
|
|
82
|
+
unless clean_repo?
|
|
83
|
+
msg = "Automated commit at #{Time.now.utc} by Nanoc #{Nanoc::VERSION}"
|
|
84
|
+
author = 'Nanoc <>'
|
|
85
|
+
run_cmd_unless_dry(%w[git add -A])
|
|
86
|
+
run_cmd_unless_dry(%W[git commit -a --author #{author} -m #{msg}])
|
|
87
|
+
end
|
|
87
88
|
|
|
89
|
+
# Push
|
|
88
90
|
if forced
|
|
89
91
|
run_cmd_unless_dry(%W[git push -f #{remote} #{branch}])
|
|
90
92
|
else
|
|
@@ -100,7 +102,7 @@ module Nanoc
|
|
|
100
102
|
end
|
|
101
103
|
|
|
102
104
|
def run_cmd(cmd, dry_run: false)
|
|
103
|
-
TTY::Command.new(
|
|
105
|
+
TTY::Command.new(**tty_command_options).run(*cmd, dry_run: dry_run)
|
|
104
106
|
end
|
|
105
107
|
|
|
106
108
|
def run_cmd_unless_dry(cmd)
|
|
@@ -108,7 +110,15 @@ module Nanoc
|
|
|
108
110
|
end
|
|
109
111
|
|
|
110
112
|
def clean_repo?
|
|
111
|
-
TTY::Command.new(
|
|
113
|
+
TTY::Command.new(**tty_command_options).run('git status --porcelain').out.empty?
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def tty_command_options
|
|
117
|
+
if Nanoc::CLI.verbosity >= 1
|
|
118
|
+
{ uuid: false }
|
|
119
|
+
else
|
|
120
|
+
{ printer: :null }
|
|
121
|
+
end
|
|
112
122
|
end
|
|
113
123
|
end
|
|
114
124
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nanoc-deploying
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Defreyne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-05-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nanoc-checking
|
|
@@ -86,7 +86,8 @@ files:
|
|
|
86
86
|
homepage: https://nanoc.ws/
|
|
87
87
|
licenses:
|
|
88
88
|
- MIT
|
|
89
|
-
metadata:
|
|
89
|
+
metadata:
|
|
90
|
+
rubygems_mfa_required: 'true'
|
|
90
91
|
post_install_message:
|
|
91
92
|
rdoc_options: []
|
|
92
93
|
require_paths:
|
|
@@ -95,14 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
95
96
|
requirements:
|
|
96
97
|
- - ">="
|
|
97
98
|
- !ruby/object:Gem::Version
|
|
98
|
-
version: '2.
|
|
99
|
+
version: '2.6'
|
|
99
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
101
|
requirements:
|
|
101
102
|
- - ">="
|
|
102
103
|
- !ruby/object:Gem::Version
|
|
103
104
|
version: '0'
|
|
104
105
|
requirements: []
|
|
105
|
-
rubygems_version: 3.
|
|
106
|
+
rubygems_version: 3.3.14
|
|
106
107
|
signing_key:
|
|
107
108
|
specification_version: 4
|
|
108
109
|
summary: Deploying support for Nanoc
|