squared 0.4.10 → 0.4.11
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/CHANGELOG.md +11 -0
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/application.rb +1 -0
- data/lib/squared/workspace/project/docker.rb +20 -12
- data/lib/squared/workspace/project/git.rb +11 -8
- data/lib/squared/workspace/project/python.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa16edc572cc39bb0bef0b2b5ba04419f2994e824923b354182f9e60b6aee1b2
|
4
|
+
data.tar.gz: 75a6b805d236d45f09b331bf62cbfcc5f9b043632d194474511763c7fc7fbf64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 510b7807e4e2be74dfe8ba5202115e3b5cefbd27d94cb14af169007bcdedde7f8c8516679c1bc614cb633eb1a904a6309403346f7c0c8490ad13fa208f2bd1f0
|
7
|
+
data.tar.gz: 3a124f06b78467a4eda6a1f34c2a80f6bb9f78867c5daefbcb0f628d9eb6a4bfbf0193e0d5509f38000e7e6ce6c8c3f4d112f0c0146260d30664692cda495186
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.4.11] - 2025-05-09
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- Docker command build action bake is interactive.
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- Docker build command was not functional.
|
12
|
+
|
3
13
|
## [0.4.10] - 2025-05-08
|
4
14
|
|
5
15
|
### Added
|
@@ -655,6 +665,7 @@
|
|
655
665
|
|
656
666
|
- Changelog was created.
|
657
667
|
|
668
|
+
[0.4.11]: https://github.com/anpham6/squared/releases/tag/v0.4.11-ruby
|
658
669
|
[0.4.10]: https://github.com/anpham6/squared/releases/tag/v0.4.10-ruby
|
659
670
|
[0.4.9]: https://github.com/anpham6/squared/releases/tag/v0.4.9-ruby
|
660
671
|
[0.4.8]: https://github.com/anpham6/squared/releases/tag/v0.4.8-ruby
|
data/lib/squared/version.rb
CHANGED
@@ -138,10 +138,14 @@ module Squared
|
|
138
138
|
buildx(:build, args.extras, "#{flag}": param)
|
139
139
|
end
|
140
140
|
when :bake
|
141
|
-
format_desc action, flag, 'opts*,target*,context?'
|
141
|
+
format_desc action, flag, ':?,opts*,target*,context?'
|
142
142
|
task flag do |_, args|
|
143
|
-
args =
|
144
|
-
|
143
|
+
args = args.to_a
|
144
|
+
if args.first == ':'
|
145
|
+
choice_command :bake
|
146
|
+
else
|
147
|
+
buildx flag, args
|
148
|
+
end
|
145
149
|
end
|
146
150
|
end
|
147
151
|
when 'compose'
|
@@ -226,11 +230,11 @@ module Squared
|
|
226
230
|
image(:rm, sync: sync)
|
227
231
|
end
|
228
232
|
|
229
|
-
def compose(opts, flags = nil, script: false, args: nil, from: :
|
233
|
+
def compose(opts, flags = nil, script: false, args: nil, from: :run, **)
|
230
234
|
return opts if script == false
|
231
235
|
|
232
236
|
ret = docker_session
|
233
|
-
if from == :
|
237
|
+
if from == :run
|
234
238
|
case (n = filetype)
|
235
239
|
when 1, 2
|
236
240
|
ret << 'buildx' << 'bake'
|
@@ -254,14 +258,16 @@ module Squared
|
|
254
258
|
when Enumerable
|
255
259
|
ret.merge(opts.to_a)
|
256
260
|
end
|
257
|
-
[args, flags].each_with_index do |target, index|
|
258
|
-
next unless target
|
259
261
|
|
260
|
-
|
261
|
-
|
262
|
+
[args, flags].each_with_index do |target, index|
|
263
|
+
if target.is_a?(String)
|
264
|
+
ret << target
|
265
|
+
elsif (target = append_any(target, target: []))
|
266
|
+
ret.merge(target.map { |arg| index == 0 ? fill_option(arg) : quote_option('build-arg', arg) })
|
267
|
+
end
|
262
268
|
end
|
263
269
|
case from
|
264
|
-
when :
|
270
|
+
when :run
|
265
271
|
case @secrets
|
266
272
|
when String
|
267
273
|
ret << quote_option('secret', @secrets, double: true)
|
@@ -683,6 +689,8 @@ module Squared
|
|
683
689
|
['Choose an image', 'images -a', 2]
|
684
690
|
when :exec
|
685
691
|
['Choose a container', 'ps -a', 0]
|
692
|
+
when :bake
|
693
|
+
['Choose a target', 'buildx bake --list=type=targets', 0]
|
686
694
|
else
|
687
695
|
['Choose a network', 'network ls', 0]
|
688
696
|
end
|
@@ -698,10 +706,10 @@ module Squared
|
|
698
706
|
when :run, :exec
|
699
707
|
values = [['Options', flag == :run], ['Arguments', flag == :exec]]
|
700
708
|
cmd = flag.to_s
|
701
|
-
when :rm
|
709
|
+
when :rm, :bake
|
702
710
|
values = ['Options']
|
703
711
|
multiple = true
|
704
|
-
cmd =
|
712
|
+
cmd = flag == :rm ? 'image rm' : "buildx bake -f #{shell_quote(dockerfile)}"
|
705
713
|
else
|
706
714
|
values = ['Options', ['Container', true]]
|
707
715
|
cmd = "network #{flag}"
|
@@ -288,17 +288,20 @@ module Squared
|
|
288
288
|
namespace(name = ws.task_name('git')) do
|
289
289
|
all = ws.task_join(name, 'all')
|
290
290
|
|
291
|
-
ws.format_desc(all,
|
291
|
+
ws.format_desc(all, 'stash|rebase|autostash?,depend?')
|
292
292
|
task 'all' do |_, args|
|
293
|
-
|
294
|
-
cmd = if
|
295
|
-
[
|
296
|
-
elsif
|
297
|
-
[
|
293
|
+
args = args.to_a
|
294
|
+
cmd = if args.include?('stash')
|
295
|
+
['stash', 'pull']
|
296
|
+
elsif args.include?('rebase')
|
297
|
+
['rebase']
|
298
|
+
elsif args.include?('autostash')
|
299
|
+
['autostash']
|
298
300
|
else
|
299
|
-
[
|
301
|
+
['pull']
|
300
302
|
end
|
301
|
-
cmd
|
303
|
+
cmd.map! { |val| ws.task_sync(val) }
|
304
|
+
cmd << ws.task_sync('depend') if args.include?('depend') && !ws.series.exclude?(:depend, true)
|
302
305
|
cmd << ws.task_sync('build')
|
303
306
|
Common::Utils.task_invoke(*cmd, **ws.invokeargs)
|
304
307
|
end
|
@@ -184,12 +184,12 @@ module Squared
|
|
184
184
|
task flag, [:strategy] do |_, args|
|
185
185
|
case (strategy = args.strategy)
|
186
186
|
when 'eager', 'only-if-needed'
|
187
|
-
|
187
|
+
args = args.extras
|
188
188
|
else
|
189
|
-
|
189
|
+
args = args.to_a
|
190
190
|
strategy = nil
|
191
191
|
end
|
192
|
-
install(flag,
|
192
|
+
install(flag, args, strategy: strategy)
|
193
193
|
end
|
194
194
|
when :target
|
195
195
|
task flag, [:dir] do |_, args|
|