mozconfig 0.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/images/screenshot.png +0 -0
- data/README.md +22 -2
- data/VERSION +1 -1
- data/lib/mozconfig.rb +9 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 763a2f67182e3f5c2e44e422e812f7ee687885f9680191768d2a541574028316
|
4
|
+
data.tar.gz: abdd7beeb729e627d908153dc0eb2fbb80cc6d628b27bb6541151e92c5d92329
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7ce49eaae4ccb2b52c69b64471d10a36bbf49db05708f574861bffe52a9e955b10df4a9e84a697ea3aee15ac4385344354f386d05e7ad99f533585efb085823
|
7
|
+
data.tar.gz: bfc5744933837ed04fd0a5eb6618c0969c809a742d51c39e3d8e3a9fdd9b2d62fca909439abc23f99a2b6a7d08724b7ea2c53bfdc8e05f934dad799a201d3a8a
|
Binary file
|
data/README.md
CHANGED
@@ -25,16 +25,30 @@ ac_add_options --with-ccache=sccache
|
|
25
25
|
# ac_add_options --with-branding=browser/branding/nightly
|
26
26
|
# ac_add_options --enable-artifact-builds
|
27
27
|
|
28
|
+
# SpiderMonkey (debug)
|
29
|
+
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-js-debug-@CONFIG_GUESS@
|
30
|
+
# ac_add_options --enable-project=js
|
31
|
+
# ac_add_options --with-ccache=sccache
|
32
|
+
# ac_add_options --enable-debug
|
33
|
+
# ac_add_options --disable-optimize
|
34
|
+
|
35
|
+
# SpiderMonkey (optimized)
|
36
|
+
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-js-opt-@CONFIG_GUESS@
|
37
|
+
# ac_add_options --enable-project=js
|
38
|
+
# ac_add_options --with-ccache=sccache
|
39
|
+
# ac_add_options --enable-optimize
|
40
|
+
# ac_add_options --disable-debug
|
41
|
+
|
28
42
|
# Thunderbird
|
29
43
|
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mail-@CONFIG_GUESS@
|
30
|
-
# ac_add_options --enable-project=comm/mail
|
31
44
|
# ac_add_options --with-branding=comm/mail/branding/nightly
|
45
|
+
# ac_add_options --enable-project=comm/mail
|
32
46
|
# ac_add_options --with-ccache=sccache
|
33
47
|
|
34
48
|
# Thunderbird (artifact build)
|
35
49
|
# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mail-@CONFIG_GUESS@
|
36
|
-
# ac_add_options --enable-project=comm/mail
|
37
50
|
# ac_add_options --with-branding=comm/mail/branding/nightly
|
51
|
+
# ac_add_options --enable-project=comm/mail
|
38
52
|
# ac_add_options --enable-artifact-builds
|
39
53
|
```
|
40
54
|
|
@@ -42,3 +56,9 @@ The options are separated into "paragraphs", each one a separate configuration.
|
|
42
56
|
This tool will comment out all of the inactive configurations. The comment
|
43
57
|
above each paragraph will be the name displayed in the TUI. Any paragraph
|
44
58
|
without a comment above it will remain active in all configurations.
|
59
|
+
|
60
|
+
Run `mozconfig` at the root of the source tree and you will be presented with a
|
61
|
+
picker where you can select your configuration, e.g.:
|
62
|
+
|
63
|
+
![Screenshot of
|
64
|
+
TUI](https://github.com/vinnydiehl/mozconfig/blob/main/.github/images/screenshot.png)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1
|
1
|
+
0.2.1
|
data/lib/mozconfig.rb
CHANGED
@@ -31,10 +31,18 @@ module MozConfig
|
|
31
31
|
@configs = configs.to_h { |cfg| [cfg.first.uncomment.strip, cfg[1..]] }
|
32
32
|
# Globals won't be manipulated further so we can rejoin them
|
33
33
|
@globals.map!(&:join)
|
34
|
+
|
35
|
+
# Find the active config
|
36
|
+
@active = @configs.find { |_, options| !options.first.commented? }&.first
|
34
37
|
end
|
35
38
|
|
36
39
|
def run
|
37
|
-
selection =
|
40
|
+
selection = begin
|
41
|
+
TTY::Prompt.new.select("Pick a configuration", @configs, default: @active)
|
42
|
+
rescue TTY::Reader::InputInterrupt
|
43
|
+
$stderr.puts "\nProcess interrupted. Closing"
|
44
|
+
exit 130
|
45
|
+
end
|
38
46
|
|
39
47
|
output = "#{@globals.join("\n\n")}\n\n"
|
40
48
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mozconfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vinny Diehl
|
@@ -59,6 +59,7 @@ executables:
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
+
- ".github/images/screenshot.png"
|
62
63
|
- ".gitignore"
|
63
64
|
- ".rubocop.yml"
|
64
65
|
- Gemfile
|
@@ -90,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
91
|
- !ruby/object:Gem::Version
|
91
92
|
version: '0'
|
92
93
|
requirements: []
|
93
|
-
rubygems_version: 3.4.
|
94
|
+
rubygems_version: 3.4.19
|
94
95
|
signing_key:
|
95
96
|
specification_version: 4
|
96
97
|
summary: TUI mozconfig switcher
|