mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-07 05:42:42 +00:00
Add support for dependency & architectures as common options.
This commit is contained in:
+12
-4
@@ -8,14 +8,22 @@ import (
|
||||
|
||||
// ConfigStructure is structure of main configuration
|
||||
type ConfigStructure struct {
|
||||
RootDir string `json:"rootDir"`
|
||||
DownloadConcurrency int `json:"downloadConcurrency"`
|
||||
RootDir string `json:"rootDir"`
|
||||
DownloadConcurrency int `json:"downloadConcurrency"`
|
||||
Architectures []string `json:"architectures"`
|
||||
DepFollowSuggests bool `json:"dependencyFollowSuggests"`
|
||||
DepFollowRecommends bool `json:"dependencyFollowRecommends"`
|
||||
DepFollowAllVariants bool `json:"dependencyFollowAllVariants"`
|
||||
}
|
||||
|
||||
// Config is configuration for aptly, shared by all modules
|
||||
var Config = ConfigStructure{
|
||||
RootDir: filepath.Join(os.Getenv("HOME"), ".aptly"),
|
||||
DownloadConcurrency: 4,
|
||||
RootDir: filepath.Join(os.Getenv("HOME"), ".aptly"),
|
||||
DownloadConcurrency: 4,
|
||||
Architectures: []string{},
|
||||
DepFollowSuggests: false,
|
||||
DepFollowRecommends: false,
|
||||
DepFollowAllVariants: false,
|
||||
}
|
||||
|
||||
// LoadConfig loads configuration from json file
|
||||
|
||||
@@ -43,7 +43,11 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
|
||||
c.Check(string(buf), Equals, ""+
|
||||
"{\n"+
|
||||
" \"rootDir\": \"/tmp/aptly\",\n"+
|
||||
" \"downloadConcurrency\": 5\n"+
|
||||
" \"downloadConcurrency\": 5,\n"+
|
||||
" \"architectures\": null,\n"+
|
||||
" \"dependencyFollowSuggests\": false,\n"+
|
||||
" \"dependencyFollowRecommends\": false,\n"+
|
||||
" \"dependencyFollowAllVariants\": false\n"+
|
||||
"}")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user