itamae-plugin-recipe-highlight 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/itamae/plugin/recipe/highlight/default.rb +65 -65
- data/lib/itamae/plugin/recipe/highlight/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29f4729ace2c86bb91175dd17de087b59a51424044ec85e61d52bb4e31be2fc3
|
4
|
+
data.tar.gz: 35249ac240b005f451668ee33aa4a049a3677a4784b21d60858099a5cb720474
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3519396bee3343a961870d09e20b1e12c6070aa87c3462f27f885537e845840d67906e709e448f6c6c5ce0a3462eb71879f23ba9d2268cb88c8092625de2b9d6
|
7
|
+
data.tar.gz: 1dd7385622869db646985b33eb26ead89b5efe170a343996ea2cb25f1412eccdef9467f6753961c8830e118e4ebe0bb963be996c4308742ba9b708c0ef658a3c
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,7 @@ node.reverse_merge!(
|
|
5
5
|
{
|
6
6
|
highlight: {
|
7
7
|
tmp: '/tmp',
|
8
|
-
version: '4.
|
8
|
+
version: '4.11',
|
9
9
|
command: 'highlight',
|
10
10
|
verify: true,
|
11
11
|
dependencies: {
|
@@ -54,95 +54,95 @@ grep_version = [node[:highlight][:commands][:grep], "highlight version #{ node[:
|
|
54
54
|
print_version = [node[:highlight][:command], '--version'].shelljoin
|
55
55
|
updated = "#{ print_version } | #{ grep_version }"
|
56
56
|
|
57
|
-
|
58
|
-
source_dir = File.join(tmp_dir, "highlight-#{ node[:highlight][:version] }")
|
59
|
-
makefile_exists = [node[:highlight][:commands][:test], '-f', File.join(source_dir, 'makefile')].shelljoin
|
57
|
+
tmp_dir = run_command(["mktemp", "--directory", "--tmpdir=#{node[:highlight][:tmp]}"].shelljoin).stdout
|
60
58
|
|
61
|
-
|
62
|
-
|
63
|
-
download_root_url = 'http://www.andre-simon.de/zip/'
|
59
|
+
source_dir = File.join(tmp_dir, "highlight-#{ node[:highlight][:version] }")
|
60
|
+
makefile_exists = [node[:highlight][:commands][:test], '-f', File.join(source_dir, 'makefile')].shelljoin
|
64
61
|
|
65
|
-
|
62
|
+
archive_file_name = "highlight-#{ node[:highlight][:version] }.tar.bz2"
|
63
|
+
archive_file_path = File.join(tmp_dir, archive_file_name)
|
64
|
+
download_root_url = 'http://www.andre-simon.de/zip/'
|
66
65
|
|
67
|
-
|
66
|
+
directory tmp_dir
|
68
67
|
|
69
|
-
|
70
|
-
cwd tmp_dir
|
71
|
-
download = [node[:highlight][:commands][:wget], URI.join(download_root_url, archive_file_name).to_s].shelljoin
|
72
|
-
command download
|
68
|
+
package 'wget'
|
73
69
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
70
|
+
execute 'download archive file' do
|
71
|
+
cwd tmp_dir
|
72
|
+
download = [node[:highlight][:commands][:wget], URI.join(download_root_url, archive_file_name).to_s].shelljoin
|
73
|
+
command download
|
78
74
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
http_request signature_path do
|
84
|
-
url URI.join(download_root_url, signature_name).to_s
|
75
|
+
not_if command_exists
|
76
|
+
not_if updated
|
77
|
+
not_if makefile_exists
|
78
|
+
end
|
85
79
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
end
|
80
|
+
if node[:highlight][:verify]
|
81
|
+
signature_name = "highlight-#{ node[:highlight][:version] }.tar.bz2.asc"
|
82
|
+
signature_path = File.join(tmp_dir, signature_name)
|
90
83
|
|
91
|
-
|
92
|
-
|
84
|
+
http_request signature_path do
|
85
|
+
url URI.join(download_root_url, signature_name).to_s
|
93
86
|
|
94
|
-
|
95
|
-
|
87
|
+
not_if command_exists
|
88
|
+
not_if updated
|
89
|
+
not_if [node[:highlight][:commands][:test], '-f', signature_path].shelljoin
|
90
|
+
end
|
96
91
|
|
97
|
-
|
98
|
-
|
92
|
+
execute 'receive key' do
|
93
|
+
key_id = 'D805A7C7'
|
99
94
|
|
100
|
-
|
101
|
-
|
102
|
-
only_if "#{ export_public_key } | #{ check_not_yet_imported }"
|
103
|
-
end
|
95
|
+
fetch_key = [node[:highlight][:commands][:gpg], '--keyserver', 'pgp.mit.edu', '--recv-key', key_id].shelljoin
|
96
|
+
command fetch_key
|
104
97
|
|
105
|
-
|
106
|
-
|
107
|
-
command verify_archive
|
98
|
+
not_if command_exists
|
99
|
+
not_if updated
|
108
100
|
|
109
|
-
|
110
|
-
|
111
|
-
|
101
|
+
export_public_key = [node[:highlight][:commands][:gpg], '--export', '--armor', key_id].shelljoin
|
102
|
+
check_not_yet_imported = [node[:highlight][:commands][:grep], 'nothing exported'].shelljoin
|
103
|
+
only_if "#{ export_public_key } | #{ check_not_yet_imported }"
|
112
104
|
end
|
113
105
|
|
114
|
-
execute '
|
115
|
-
|
116
|
-
command
|
117
|
-
cwd tmp_dir
|
106
|
+
execute 'verify' do
|
107
|
+
verify_archive = [node[:highlight][:commands][:gpg], '--verify', signature_path, archive_file_path].shelljoin
|
108
|
+
command verify_archive
|
118
109
|
|
119
110
|
not_if command_exists
|
120
111
|
not_if updated
|
121
|
-
not_if makefile_exists
|
122
112
|
end
|
113
|
+
end
|
123
114
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
end
|
129
|
-
end
|
115
|
+
execute 'extract' do
|
116
|
+
extract_archive = [node[:highlight][:commands][:tar], 'axf', archive_file_path].shelljoin
|
117
|
+
command extract_archive
|
118
|
+
cwd tmp_dir
|
130
119
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
120
|
+
not_if command_exists
|
121
|
+
not_if updated
|
122
|
+
not_if makefile_exists
|
123
|
+
end
|
135
124
|
|
125
|
+
[node[:highlight][:dependencies][:lua], node[:highlight][:dependencies][:boost]].each do |pack|
|
126
|
+
package pack do
|
136
127
|
not_if command_exists
|
137
128
|
not_if updated
|
138
129
|
end
|
130
|
+
end
|
139
131
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
132
|
+
execute 'compile' do
|
133
|
+
compile_cli = [node[:highlight][:commands][:make], 'cli'].shelljoin
|
134
|
+
command compile_cli
|
135
|
+
cwd source_dir
|
144
136
|
|
145
|
-
|
146
|
-
|
147
|
-
|
137
|
+
not_if command_exists
|
138
|
+
not_if updated
|
139
|
+
end
|
140
|
+
|
141
|
+
execute 'install' do
|
142
|
+
install_files = [node[:highlight][:commands][:make], 'install'].shelljoin
|
143
|
+
command install_files
|
144
|
+
cwd source_dir
|
145
|
+
|
146
|
+
not_if command_exists
|
147
|
+
not_if updated
|
148
148
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-highlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gemmaro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|