autoproj 2.15.3 → 2.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 637e55569497703d3288f3d36fe316c204238c65f32e566811223a4bc9028b44
4
- data.tar.gz: d55c78b10017e3e9e4b42e879edea1478baaff3c80705eddeca69156c84accf5
3
+ metadata.gz: bb77cb6d5c3c156ae3d665933ec7380f5b0ae491767b87c6e6f25c9c96966885
4
+ data.tar.gz: 1474ca4f6e00f46dc70631f25c70e0cf0340d85f62101053117faf79ed65bd21
5
5
  SHA512:
6
- metadata.gz: 7b6a24e168732906376569b34ba8a3ce562988d3ce4fcb4bb0eafd0e22726b76fe9fcb0f4dbfc4b7b306d2d6683c7e534f2d8d1e7ae1aebdd2bc4404c6fe21fe
7
- data.tar.gz: 14252a325369a374459ce7115ffba28937e58e64e635e15fc1f1295f6208b2ec38c272799f66b1115668a81b30a3334c27375739e15ddcfa3e29ed4119535343
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
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "2.15.3"
2
+ VERSION = "2.16.0"
3
3
  end
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.15.3
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-02-25 00:00:00.000000000 Z
11
+ date: 2022-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild