runfile-tasks 1.0.1 → 1.0.3

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/docker.runfile +18 -4
  3. data/gem.runfile +1 -2
  4. data/yard.runfile +8 -0
  5. metadata +7 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c9053330f6de48b1a256bfe8878c9cd9f2caa2f39442dd6d348dd4e5b450eee
4
- data.tar.gz: 72c148f9cdd1d450650b8e4350e14717c2c69465e0e0e184f85cd4475e741182
3
+ metadata.gz: 4f89325e6fa987c92d5a0524756882da6cde621871d29b6b8c1aae2eb2876d56
4
+ data.tar.gz: 8637c30a8e73a5ee5ed6d21999f857f9dfd141212124801d2ef9b027c9dba4b5
5
5
  SHA512:
6
- metadata.gz: 51f4f1d8683cb0bf6f7d17d84651317e3d51857e32a07886919814d96796e587d327cd3eacefb6c6878b693e4ccf097632c00c0297fbc72fc8fc61df5bd0d08a
7
- data.tar.gz: 0cafcd6a005b243d84158ea943af78b6eaca197f89ed5b047ee66d3dac7980f5031326d8fed0fbf713138d325410b4c259c8293d367d86a41d9747f9658e9ad5
6
+ metadata.gz: be90a2e42f99fd2265309d076d23dc0f0756bc36442d3fe7f61490c25bdaaca648d8b08828ec0b39dcb87f4f5f896d6bbef030445b926c335b0595dea5004aba
7
+ data.tar.gz: 0d7650b544489d60b0579b3d52ae492eaf27f376373607cf475cc3ae0172a3c49feacf5bb5962916dcbea240fbeacfa865d5debf6b8cdfdc5bbcf7a7f04dbc3b
data/docker.runfile CHANGED
@@ -1,5 +1,4 @@
1
- title 'Docker image commands'
2
- summary 'Ddocker building and publishing commands'
1
+ summary 'Ddocker management commands'
3
2
 
4
3
  require_context :image
5
4
  require_context :version
@@ -9,11 +8,11 @@ action :build, :b do
9
8
  say "g`Building docker image #{image}`"
10
9
  run "docker build -t #{image} ."
11
10
  run "docker tag #{image} #{image}:#{version}"
12
- run "docker images | grep #{image}"
11
+ run "docker images |grep #{image}"
13
12
  end
14
13
 
15
14
  help 'Run the image with --version and compare it with the provided version'
16
- action :test, :t do |_args|
15
+ action :test, :t do
17
16
  docker_version = `docker run --rm #{image} --version`.chomp
18
17
  if docker_version == version
19
18
  say "g`PASS: docker version is #{docker_version}`"
@@ -32,6 +31,21 @@ action :push, :p do
32
31
  run "docker push #{image}:#{version}"
33
32
  end
34
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
+
35
49
  helpers do
36
50
  def image
37
51
  context[:image]
data/gem.runfile CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'fileutils'
2
2
 
3
- title 'Gem management commands'
4
- summary 'Gem building and publishing commands'
3
+ summary 'Gem management commands'
5
4
 
6
5
  require_context :private, default: false
7
6
 
data/yard.runfile ADDED
@@ -0,0 +1,8 @@
1
+ summary 'YARD documentation commands'
2
+
3
+ help "Run YARD server"
4
+ usage "server [--port PORT]"
5
+ option "--port, -p PORT", "Set server port [default: 3000]"
6
+ action :server do |args|
7
+ system "yard server --server puma --port #{args['--port']} --bind 0.0.0.0 --reload"
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.1
4
+ version: 1.0.3
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: 2023-02-02 00:00:00.000000000 Z
11
+ date: 2024-02-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A collection of tasks for Runfile
14
14
  email: db@dannyben.com
@@ -19,12 +19,13 @@ files:
19
19
  - README.md
20
20
  - docker.runfile
21
21
  - gem.runfile
22
+ - yard.runfile
22
23
  homepage: https://github.com/DannyBen/runfile-tasks
23
24
  licenses:
24
25
  - MIT
25
26
  metadata:
26
27
  rubygems_mfa_required: 'true'
27
- post_install_message:
28
+ post_install_message:
28
29
  rdoc_options: []
29
30
  require_paths:
30
31
  - lib
@@ -39,8 +40,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
40
  - !ruby/object:Gem::Version
40
41
  version: '0'
41
42
  requirements: []
42
- rubygems_version: 3.4.6
43
- signing_key:
43
+ rubygems_version: 3.5.6
44
+ signing_key:
44
45
  specification_version: 4
45
46
  summary: Runfile tasks collection
46
47
  test_files: []