squared 0.9.0.pre2 → 0.9.0
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 +3 -1
- data/README.md +1 -0
- data/exe/sqd +20 -4
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/application.rb +27 -18
- data/lib/squared/workspace/project/base.rb +2 -2
- data/lib/squared/workspace/project/docker.rb +1 -1
- data/lib/squared/workspace/project/git.rb +2 -2
- data/lib/squared/workspace/project/node.rb +3 -5
- data/lib/squared/workspace/project/python.rb +22 -17
- data/lib/squared/workspace/project/support/class.rb +10 -10
- 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: 41f1d82942dcd7279ec182d1fc0bdc8f90ccc2e476860c6ca70bc89286417598
|
|
4
|
+
data.tar.gz: e6b7773f70fd0d2867fe13bdae57324dd6c90048c8bea3b27937738edf4df78c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc02b93ac5fbfd34e23ff87cda66a3665fca3490c942e7a5942edb9ba6540eb6b95e1c87d8273444ec4bbac6d56841b7b3213295ce9ee856c15383794ecac97a
|
|
7
|
+
data.tar.gz: ee1c5b726339754ee878ff97cd9994983cbc5ca4822d2ffa25170c2f3512414966f367dcc5c4f0f2bc1eb8156667b88fcffc294ccbab1468c57ef465bb387243
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## [0.9.0] - 2026-10-12
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
- Ruby command script does not run code until it has passed validation.
|
|
37
37
|
- Ruby gem io-console is used for default console size.
|
|
38
38
|
- Node program tsc boolean options support explicit values.
|
|
39
|
+
- Python program meson prefix options use local path resolution.
|
|
39
40
|
|
|
40
41
|
### Removed
|
|
41
42
|
|
|
@@ -2197,6 +2198,7 @@
|
|
|
2197
2198
|
|
|
2198
2199
|
- Changelog was created.
|
|
2199
2200
|
|
|
2201
|
+
[0.9.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.9.0
|
|
2200
2202
|
[0.8.6]: https://github.com/anpham6/squared-ruby/releases/tag/v0.8.6
|
|
2201
2203
|
[0.8.5]: https://github.com/anpham6/squared-ruby/releases/tag/v0.8.5
|
|
2202
2204
|
[0.8.4]: https://github.com/anpham6/squared-ruby/releases/tag/v0.8.4
|
data/README.md
CHANGED
|
@@ -43,6 +43,7 @@ Usage: sqd [options] [rake options] [global...] [:targets...] -- [rake targets..
|
|
|
43
43
|
|
|
44
44
|
-s, --[no-]strict Do not run commands with invalid arguments
|
|
45
45
|
--update Use update strategy for applicable commands
|
|
46
|
+
--parallel STR,PAT Run standard tasks with multi-task threads
|
|
46
47
|
-F, --force [STR,STR] Enable force through ENV by application
|
|
47
48
|
-y, --yes [STR,STR] Enable auto-approve through ENV by application
|
|
48
49
|
-d, --dry-run Run commands without any modifying actions
|
data/exe/sqd
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
-
$:.unshift(File.expand_path('../lib', __dir__)) if File.exist?(File.expand_path('../squared.gemspec', __dir__))
|
|
5
|
-
|
|
6
4
|
require 'squared'
|
|
7
5
|
require 'rake'
|
|
8
6
|
require 'optparse'
|
|
@@ -103,6 +101,18 @@ class SqdParser < OptionParser
|
|
|
103
101
|
ARGV[index] = ''
|
|
104
102
|
end
|
|
105
103
|
end
|
|
104
|
+
if options[:parallel]
|
|
105
|
+
pattern, parallel = options[:parallel].partition do |val|
|
|
106
|
+
next false if val.match?(%r{^[\w~`!@#%&\-=:;"'<>/]+$})
|
|
107
|
+
|
|
108
|
+
Regexp.new(val)
|
|
109
|
+
rescue RegexpError
|
|
110
|
+
false
|
|
111
|
+
end
|
|
112
|
+
session = Squared::Common::ARG
|
|
113
|
+
session[:APP][:build_pattern] = pattern.map { |pat| Regexp.new(pat) } unless pattern.empty?
|
|
114
|
+
session[:APP][:build_parallel] = parallel unless parallel.empty?
|
|
115
|
+
end
|
|
106
116
|
ARGV.reject!(&:empty?)
|
|
107
117
|
Rake.application.run(global.concat(ARGV))
|
|
108
118
|
end
|
|
@@ -144,6 +154,7 @@ SqdParser.new do |sqd|
|
|
|
144
154
|
sqd.on('--update', 'Use update strategy for applicable commands') do
|
|
145
155
|
ENV['UPDATE'] = 'true'
|
|
146
156
|
end
|
|
157
|
+
sqd.on('--parallel STR,PAT', Array, 'Run standard tasks with multi-task threads')
|
|
147
158
|
sqd.on('-F', '--force [STR,STR]', Array, 'Enable force through ENV by application') do |val|
|
|
148
159
|
sqd.parse_common(val, session: session, arg: :FORCE)
|
|
149
160
|
end
|
|
@@ -211,9 +222,14 @@ SqdParser.new do |sqd|
|
|
|
211
222
|
end
|
|
212
223
|
sqd.on('--version', 'Print the current version') do
|
|
213
224
|
puts Squared::VERSION
|
|
214
|
-
exit
|
|
225
|
+
exit
|
|
215
226
|
end
|
|
216
227
|
sqd.on('-h', '--help', 'Print the command line options') do
|
|
217
|
-
sqd.help_exit
|
|
228
|
+
if defined?(sqd.help_exit)
|
|
229
|
+
sqd.help_exit
|
|
230
|
+
else
|
|
231
|
+
puts sqd.help
|
|
232
|
+
exit
|
|
233
|
+
end
|
|
218
234
|
end
|
|
219
235
|
end.run
|
data/lib/squared/version.rb
CHANGED
|
@@ -163,9 +163,10 @@ module Squared
|
|
|
163
163
|
end
|
|
164
164
|
@pass.items.concat(kwargs[:pass].map { |val| val.is_a?(Regexp) ? val : val.to_s }) if kwargs[:pass]
|
|
165
165
|
@series = Application.register(self, @base.to_a, exclude: kwargs.fetch(:exclude, []))
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
app = ARG[:APP]
|
|
167
|
+
@series.ref_min = app[:series_ref_min] if app.key?(:series_ref_min)
|
|
168
|
+
kwargs[:pattern].concat(app[:build_pattern]) if app.key?(:build_pattern)
|
|
169
|
+
kwargs[:parallel].concat(app[:build_parallel]) if app.key?(:build_parallel)
|
|
169
170
|
self.closed = 'begin'
|
|
170
171
|
pb = @stage.key?('project:begin')
|
|
171
172
|
pe = @stage.key?('project:end')
|
|
@@ -652,16 +653,24 @@ module Squared
|
|
|
652
653
|
val = val.split(':') if val.is_a?(String)
|
|
653
654
|
if before || after || opts
|
|
654
655
|
pos = []
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
656
|
+
append = lambda do |data|
|
|
657
|
+
pos << case data
|
|
658
|
+
when Array
|
|
659
|
+
data.join(',')
|
|
660
|
+
when Hash
|
|
661
|
+
data.keys.join('|')
|
|
659
662
|
else
|
|
660
|
-
|
|
663
|
+
data
|
|
661
664
|
end
|
|
662
665
|
end
|
|
663
|
-
|
|
664
|
-
|
|
666
|
+
append.call(before)
|
|
667
|
+
pos << if opts.is_a?(Array)
|
|
668
|
+
arg ? "#{arg}=#{opts.join(',')}" : opts.join('|')
|
|
669
|
+
else
|
|
670
|
+
opts
|
|
671
|
+
end
|
|
672
|
+
append.call(after)
|
|
673
|
+
val << "#{val.pop}[#{pos.compact.join(',')}]"
|
|
665
674
|
end
|
|
666
675
|
out ? message(*val) : task_desc(*val)
|
|
667
676
|
end
|
|
@@ -717,12 +726,12 @@ module Squared
|
|
|
717
726
|
!@extensions.empty? || any? { |proj| proj.enabled?(base: false) }
|
|
718
727
|
end
|
|
719
728
|
|
|
720
|
-
def task_base?(
|
|
721
|
-
series.base?(
|
|
729
|
+
def task_base?(...)
|
|
730
|
+
series.base?(...)
|
|
722
731
|
end
|
|
723
732
|
|
|
724
|
-
def task_extend?(
|
|
725
|
-
series.extend?(
|
|
733
|
+
def task_extend?(...)
|
|
734
|
+
series.extend?(...)
|
|
726
735
|
end
|
|
727
736
|
|
|
728
737
|
def task_include?(obj, key, ref: nil)
|
|
@@ -758,12 +767,12 @@ module Squared
|
|
|
758
767
|
!!find(home)&.enabled?
|
|
759
768
|
end
|
|
760
769
|
|
|
761
|
-
def rootpath(
|
|
762
|
-
root.join(
|
|
770
|
+
def rootpath(...)
|
|
771
|
+
root.join(...)
|
|
763
772
|
end
|
|
764
773
|
|
|
765
|
-
def homepath(
|
|
766
|
-
home.join(
|
|
774
|
+
def homepath(...)
|
|
775
|
+
home.join(...)
|
|
767
776
|
end
|
|
768
777
|
|
|
769
778
|
def pwd
|
|
@@ -182,7 +182,7 @@ module Squared
|
|
|
182
182
|
if flags.nil?
|
|
183
183
|
case action
|
|
184
184
|
when 'ls'
|
|
185
|
-
format_desc(action, nil,
|
|
185
|
+
format_desc(action, nil, 'a/ll?,s/tandard?,range*', before: VAL_DOCKER[:ls])
|
|
186
186
|
task action, [:command] do |_, args|
|
|
187
187
|
command = param_guard(action, 'command', args: args, key: :command)
|
|
188
188
|
args = args.extras
|
|
@@ -1077,7 +1077,7 @@ module Squared
|
|
|
1077
1077
|
git(:remote, args.extras, extras: [name, url])
|
|
1078
1078
|
end
|
|
1079
1079
|
else
|
|
1080
|
-
format_desc
|
|
1080
|
+
format_desc(action, flag, 'opts*', before: OPT_GIT[:remote])
|
|
1081
1081
|
task flag, [:command] do |_, args|
|
|
1082
1082
|
command = param_guard(action, flag, args: args, key: :command)
|
|
1083
1083
|
cmd, opts = git_session('remote', opts: args.extras)
|
|
@@ -1840,7 +1840,7 @@ module Squared
|
|
|
1840
1840
|
if adding.empty? && !cached.empty? && banner?
|
|
1841
1841
|
puts(cached.lines(chomp: true).map { |val| "cached #{shell_quote(val)}" })
|
|
1842
1842
|
end
|
|
1843
|
-
ENV['COMMIT_PUSH'] =
|
|
1843
|
+
ENV['COMMIT_PUSH'] = git_value 'rev-parse --verify HEAD' if source(co) && source(pu) && !dryrun?
|
|
1844
1844
|
else
|
|
1845
1845
|
if banner?
|
|
1846
1846
|
puts 'Nothing to commit'
|
|
@@ -306,13 +306,11 @@ module Squared
|
|
|
306
306
|
format_desc action, nil, 'version|pre?{major,minor,patch}|prerelease'
|
|
307
307
|
task action, [:version] do |_, args|
|
|
308
308
|
version = param_guard(action, 'to', args: args, key: :version)
|
|
309
|
-
if version.match?(/^(
|
|
310
|
-
|
|
311
|
-
version = nil
|
|
309
|
+
if version.match?(/^(pre)?(major|minor|patch)|prerelease$/)
|
|
310
|
+
bump version.to_sym
|
|
312
311
|
else
|
|
313
|
-
|
|
312
|
+
bump :version, version
|
|
314
313
|
end
|
|
315
|
-
bump flag, version
|
|
316
314
|
end
|
|
317
315
|
when 'pack'
|
|
318
316
|
format_desc action, nil, 'opts*'
|
|
@@ -53,23 +53,23 @@ module Squared
|
|
|
53
53
|
common: %w[ansi no-ansi no-cache n|no-interaction no-plugins q|quiet v|verbose=+ P|project=p].freeze,
|
|
54
54
|
install: %w[all-extras all-groups compile dry-run no-directory no-root only-root E|extras=q only=q with=q
|
|
55
55
|
without=q].freeze,
|
|
56
|
-
build: %w[clean config-settings=qq f|format=b o|output=p].freeze,
|
|
56
|
+
build: %w[clean c|config-settings=qq f|format=b o|output=p].freeze,
|
|
57
57
|
publish: %w[build dry-run skip-existing cert=p client-cert=p dist-dir=p p|password=q r|repository=q
|
|
58
58
|
u|username=qq].freeze
|
|
59
59
|
}.freeze
|
|
60
60
|
OPT_PDM = {
|
|
61
|
-
common: %w[c|config I|ignore-python no-cache n|non-interactive
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
publish: %w[no-build no-very-ssl
|
|
65
|
-
i|identity=b P|password=q
|
|
61
|
+
common: %w[c|config I|ignore-python no-cache n|non-interactive q|quiet v|verbose=+ p|project=p
|
|
62
|
+
k|skip=b].freeze,
|
|
63
|
+
build: %w[C=bm no-clean no-isolation no-sdist no-wheel config-setting=qq d|dest=p].freeze,
|
|
64
|
+
publish: %w[no-build no-verify-ssl no-very-ssl S|sign skip-existing ca-certs=p c|comment=q d|dest=p
|
|
65
|
+
i|identity=b P|password=q r|repository=q u|username=qq].freeze
|
|
66
66
|
}.freeze
|
|
67
67
|
OPT_HATCH = {
|
|
68
68
|
common: %w[color interactive no-color no-interactive cache-dir=p config=p data-dir=p e|env=b p|project=b
|
|
69
69
|
q|quiet=+ v|verbose=+].freeze,
|
|
70
|
-
build: %w[clean-hooks-after ext hooks-only no-hooks c|clean t|target=b].freeze,
|
|
70
|
+
build: %w[a|all clean-hooks-after ext hooks-only no-hooks c|clean t|target=b].freeze,
|
|
71
71
|
publish: %w[initialize-auth n|no-prompt y|yes a|auth=q ca-cert=p client-cert=p client-key=p o|option=q
|
|
72
|
-
p|publisher=b r|repo=q u|user=
|
|
72
|
+
p|publisher=b r|repo=q u|user=qq].freeze
|
|
73
73
|
}.freeze
|
|
74
74
|
OPT_TWINE = {
|
|
75
75
|
publish: %w[attestations disable-progress-bar non-interactive s|sign skip-existing verbose cert=p
|
|
@@ -77,15 +77,20 @@ module Squared
|
|
|
77
77
|
sign-with=b u|username=qq].freeze
|
|
78
78
|
}.freeze
|
|
79
79
|
OPT_MESON = {
|
|
80
|
-
build: %w[D=q clearcache debug errorlogs fatal-meson-warnings pkgconfig.relocatable prefer-static
|
|
81
|
-
python.allow-limited-api reconfigure stdsplit strip vsenv werror wipe auto-features=b
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
build: %w[D=q clearcache debug errorlogs fatal-meson-warnings os2-emxomf pkgconfig.relocatable prefer-static
|
|
81
|
+
python.allow-limited-api reconfigure stdsplit strip vsenv werror wipe auto-features=b
|
|
82
|
+
backend={ninja,vs,vs2010,vs2012,vs2013,vs2015,vs2017,vs2019,vs2022,vs2026,xcode,none}
|
|
83
|
+
bindir=q build.cmake-prefix-path=p build.pkg-config-path=p
|
|
84
|
+
buildtype={plain,debug,debugoptimized,release,minsize,custom} cmake-prefix-path=p cross-file=p
|
|
85
|
+
datadir=q default-library={shared,static,both} default-both-libraries={shared,static,auto}
|
|
86
|
+
force-fallback-for=q genvslite={vs2022,vs2026} includedir=q infodir=q install-umask=b
|
|
87
|
+
layout={mirror,flat} libdir=q libexecdir=q licensedir=q localedir=q localstatedir=q mandir=q
|
|
88
|
+
namingscheme={platform,classic} native-file=p optimization={plain,0,g,1,2,3,s} pkg-config-path=p
|
|
89
|
+
prefix=p python.build-config=p python.bytecompile=b python.platlibdir=p python.purelibdir=p
|
|
90
|
+
python.install-env={auto,prefix,system,venv} sbindir=q sharedstatedir=q sysconfdir=q
|
|
91
|
+
unity={on,off,subprojects} unity-size=i warnlevel={0,1,2,3,everything}
|
|
92
|
+
wrap-mode={default,nofallback,nodownload,forcefallback,nopromote}].freeze,
|
|
93
|
+
compile: %w[C=p clean v|verbose j|jobs=i l|load-average=b ninja-args=q vs-args=q xcode-args=q].freeze
|
|
89
94
|
}.freeze
|
|
90
95
|
PASS_PYTHON = {
|
|
91
96
|
python: %w[c v V].freeze,
|
|
@@ -37,12 +37,12 @@ module Squared
|
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
def insert(
|
|
41
|
-
replace Set.new(compact.insert(
|
|
40
|
+
def insert(...)
|
|
41
|
+
replace Set.new(compact.insert(...))
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
def slice(
|
|
45
|
-
compact.slice(
|
|
44
|
+
def slice(...)
|
|
45
|
+
compact.slice(...)
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def slice!(*args)
|
|
@@ -168,16 +168,16 @@ module Squared
|
|
|
168
168
|
to_a.join(@delim)
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
-
def to_enum(
|
|
172
|
-
to_a.to_enum(
|
|
171
|
+
def to_enum(...)
|
|
172
|
+
to_a.to_enum(...)
|
|
173
173
|
end
|
|
174
174
|
|
|
175
|
-
def to_json(
|
|
176
|
-
to_a.to_json(
|
|
175
|
+
def to_json(...)
|
|
176
|
+
to_a.to_json(...)
|
|
177
177
|
end
|
|
178
178
|
|
|
179
|
-
def to_yaml(
|
|
180
|
-
to_a.to_yaml(
|
|
179
|
+
def to_yaml(...)
|
|
180
|
+
to_a.to_yaml(...)
|
|
181
181
|
end
|
|
182
182
|
|
|
183
183
|
alias add :<<
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: squared
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.0
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- An Pham
|
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
142
142
|
- !ruby/object:Gem::Version
|
|
143
143
|
version: '0'
|
|
144
144
|
requirements: []
|
|
145
|
-
rubygems_version: 4.0.
|
|
145
|
+
rubygems_version: 4.0.21
|
|
146
146
|
specification_version: 4
|
|
147
147
|
summary: Rake task generator for managing multi-language workspaces.
|
|
148
148
|
test_files: []
|