autoproj 2.15.3 → 2.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autoproj/configuration.rb +34 -0
- data/lib/autoproj/version.rb +1 -1
- 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: bb77cb6d5c3c156ae3d665933ec7380f5b0ae491767b87c6e6f25c9c96966885
|
4
|
+
data.tar.gz: 1474ca4f6e00f46dc70631f25c70e0cf0340d85f62101053117faf79ed65bd21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1fb865f1ecdfa9d290c9dbb6048e601ca99f8e691643a36ada2528137c47819a30172e7abf9bd3d5cd91c44148fa0b8a8793b4a6783fb9bee52661cad960777
|
7
|
+
data.tar.gz: 6c9b821c1158e70bdb9a98536998dafe6270f4bb778646171d4691cc82fe0ce9828e263fda268ebaeced020cc7dcdfd30a33b9e5ea5593774f1ffe39eb0326c7
|
@@ -606,5 +606,39 @@ module Autoproj
|
|
606
606
|
end
|
607
607
|
result
|
608
608
|
end
|
609
|
+
|
610
|
+
# Allows to load a seed-config.yml file (also from a buildconf repository)
|
611
|
+
# rather than providing it before checkout using the --seed-config paramater
|
612
|
+
# of the autoproj_bootstrap script
|
613
|
+
# this allows to bootstrap with --no-interactive and still apply a custom config e.g. in CI/CD
|
614
|
+
# The call to this function has to be in the init.rb of the buildconf BEFORE any other
|
615
|
+
# config option, e.g. the git server configuration settings
|
616
|
+
# The filename parameter is the name of the config seed yml file in the repository
|
617
|
+
def load_config_once(filename, config_dir: Autoproj.workspace.config_dir)
|
618
|
+
seed_config = File.expand_path(filename, config_dir)
|
619
|
+
|
620
|
+
return if get("default_config_applied_#{seed_config}", false)
|
621
|
+
|
622
|
+
Autoproj.message "loading seed config #{seed_config}"
|
623
|
+
load path: seed_config
|
624
|
+
set "default_config_applied_#{seed_config}", true, true
|
625
|
+
end
|
626
|
+
|
627
|
+
# Similar to load_config_once but asks the user if the default config should be applied
|
628
|
+
def load_config_once_with_permission(filename, default: "yes", config_dir: Autoproj.workspace.config_dir)
|
629
|
+
seed_config = File.expand_path(filename, config_dir)
|
630
|
+
# only run this code if config has not beed applied already (don't run when reconfiguring)
|
631
|
+
return if has_value_for?("use_default_config_#{seed_config}")
|
632
|
+
|
633
|
+
declare "use_default_config_#{seed_config}",
|
634
|
+
"boolean",
|
635
|
+
default: default,
|
636
|
+
doc: ["Should the default workspace config be used?",
|
637
|
+
"This buildconf denines a default configuration in the buildconf (#{seed_config})",
|
638
|
+
"Should it be applied?"]
|
639
|
+
if get("use_default_config_#{seed_config}")
|
640
|
+
load_config_once(filename, config_dir: config_dir)
|
641
|
+
end
|
642
|
+
end
|
609
643
|
end
|
610
644
|
end
|
data/lib/autoproj/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autoproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autobuild
|