runfile-tasks 1.0.2 → 1.0.4
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/docker.runfile +17 -2
- data/gem.runfile +12 -10
- data/yard.runfile +3 -3
- metadata +10 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 460c71754f82e1cf33b023b45ec97225d115404837c06542d2a32dc175de9236
|
4
|
+
data.tar.gz: d1901fec6a5bb8104e54874b1d7cb4c1cc36194a62f4a44974be5e603e34baf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6ed197b4601ae82b3da4f6258c00b23de28ac3211f2b70268716bd06959d640f4386bb99d96db9c1f0bc1949942f2d6732b9876d503a5fa2cbf6ba3e0f8851c
|
7
|
+
data.tar.gz: c0b855393735047e70b0f078425d3b20aef4c23487857b7218c310517b3e6774313b7ba0fc4e63c1eecaf29dd662439cc331368064804edf33f2ea95986693f5
|
data/docker.runfile
CHANGED
@@ -8,11 +8,11 @@ action :build, :b do
|
|
8
8
|
say "g`Building docker image #{image}`"
|
9
9
|
run "docker build -t #{image} ."
|
10
10
|
run "docker tag #{image} #{image}:#{version}"
|
11
|
-
run "docker images |
|
11
|
+
run "docker images |grep #{image}"
|
12
12
|
end
|
13
13
|
|
14
14
|
help 'Run the image with --version and compare it with the provided version'
|
15
|
-
action :test, :t do
|
15
|
+
action :test, :t do
|
16
16
|
docker_version = `docker run --rm #{image} --version`.chomp
|
17
17
|
if docker_version == version
|
18
18
|
say "g`PASS: docker version is #{docker_version}`"
|
@@ -31,6 +31,21 @@ action :push, :p do
|
|
31
31
|
run "docker push #{image}:#{version}"
|
32
32
|
end
|
33
33
|
|
34
|
+
help 'Build the image for multiple platforms and push'
|
35
|
+
usage '(multi | m) [PLATFORMS...]'
|
36
|
+
param 'PLATFORMS', 'List of platforms [default: linux/amd64 linux/arm64v8]'
|
37
|
+
action :multi, :m do |args|
|
38
|
+
platforms = args['PLATFORMS']
|
39
|
+
platforms = %w[linux/amd64 linux/arm64v8] if platforms.empty?
|
40
|
+
|
41
|
+
say "g`Building and pushing docker image #{image}`"
|
42
|
+
say "g`Platforms: #{platforms}`"
|
43
|
+
run "docker buildx build --push --platform #{platforms.join ','} -t #{image} -t #{image}:#{version} ."
|
44
|
+
|
45
|
+
say "g`Inspecting platforms for #{image}`"
|
46
|
+
run "docker buildx imagetools inspect #{image}:#{version} |grep Platform"
|
47
|
+
end
|
48
|
+
|
34
49
|
helpers do
|
35
50
|
def image
|
36
51
|
context[:image]
|
data/gem.runfile
CHANGED
@@ -4,18 +4,15 @@ summary 'Gem management commands'
|
|
4
4
|
|
5
5
|
require_context :private, default: false
|
6
6
|
|
7
|
-
help 'Build
|
8
|
-
usage '(build | b)
|
9
|
-
|
10
|
-
|
11
|
-
say "g`Building #{gemname}`"
|
12
|
-
run "gem build #{gemname}.gemspec --output #{gemfile}"
|
13
|
-
install_gem if args['--install']
|
7
|
+
help 'Build the gem'
|
8
|
+
usage '(build | b)'
|
9
|
+
action :build, :b do |_args|
|
10
|
+
build_gem
|
14
11
|
end
|
15
12
|
|
16
|
-
help '
|
13
|
+
help 'Build and install the gem'
|
17
14
|
action :install, :i do
|
18
|
-
|
15
|
+
build_gem
|
19
16
|
install_gem
|
20
17
|
end
|
21
18
|
|
@@ -47,7 +44,7 @@ helpers do
|
|
47
44
|
gemspec = Dir['*.gemspec'].first
|
48
45
|
raise UserError, 'Cannot find any *.gemspec' unless gemspec
|
49
46
|
|
50
|
-
Gem::Specification
|
47
|
+
Gem::Specification.load(gemspec).name
|
51
48
|
end
|
52
49
|
end
|
53
50
|
|
@@ -65,6 +62,11 @@ helpers do
|
|
65
62
|
run "gem install --local #{gemfile}"
|
66
63
|
end
|
67
64
|
|
65
|
+
def build_gem
|
66
|
+
say "g`Building #{gemname}`"
|
67
|
+
run "gem build #{gemname}.gemspec --output #{gemfile}"
|
68
|
+
end
|
69
|
+
|
68
70
|
def need_gemfile
|
69
71
|
raise UserError, "File not found #{gemfile}" unless File.exist? gemfile
|
70
72
|
end
|
data/yard.runfile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
summary 'YARD documentation commands'
|
2
2
|
|
3
|
-
help
|
4
|
-
usage
|
5
|
-
option
|
3
|
+
help 'Run YARD server'
|
4
|
+
usage 'server [--port PORT]'
|
5
|
+
option '--port, -p PORT', 'Set server port [default: 3000]'
|
6
6
|
action :server do |args|
|
7
7
|
system "yard server --server puma --port #{args['--port']} --bind 0.0.0.0 --reload"
|
8
8
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runfile-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A collection of tasks for Runfile
|
14
14
|
email: db@dannyben.com
|
@@ -24,8 +24,11 @@ homepage: https://github.com/DannyBen/runfile-tasks
|
|
24
24
|
licenses:
|
25
25
|
- MIT
|
26
26
|
metadata:
|
27
|
+
bug_tracker_uri: https://github.com/DannyBen/runfile-tasks/issues
|
28
|
+
changelog_uri: https://github.com/DannyBen/runfile-tasks/blob/master/CHANGELOG.md
|
29
|
+
source_code_uri: https://github.com/DannyBen/runfile-tasks
|
27
30
|
rubygems_mfa_required: 'true'
|
28
|
-
post_install_message:
|
31
|
+
post_install_message:
|
29
32
|
rdoc_options: []
|
30
33
|
require_paths:
|
31
34
|
- lib
|
@@ -33,15 +36,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
33
36
|
requirements:
|
34
37
|
- - ">="
|
35
38
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
39
|
+
version: '3.1'
|
37
40
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
41
|
requirements:
|
39
42
|
- - ">="
|
40
43
|
- !ruby/object:Gem::Version
|
41
44
|
version: '0'
|
42
45
|
requirements: []
|
43
|
-
rubygems_version: 3.
|
44
|
-
signing_key:
|
46
|
+
rubygems_version: 3.5.23
|
47
|
+
signing_key:
|
45
48
|
specification_version: 4
|
46
49
|
summary: Runfile tasks collection
|
47
50
|
test_files: []
|