Skip to content

Commit

Permalink
Stop populating the deprecated origin field
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed May 12, 2021
1 parent e7398f8 commit 1aba408
Show file tree
Hide file tree
Showing 44 changed files with 258 additions and 422 deletions.
13 changes: 7 additions & 6 deletions cli/build/swmodule.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ import (
)

type SWModule struct {
Type string `yaml:"type,omitempty" json:"type,omitempty"`
Type string `yaml:"type,omitempty" json:"type,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Location string `yaml:"location,omitempty" json:"location,omitempty"`
// Origin is deprecated since 2017/08/18
OriginOld string `yaml:"origin,omitempty" json:"origin,omitempty"`
Location string `yaml:"location,omitempty" json:"location,omitempty"`
Version string `yaml:"version,omitempty" json:"version,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Variant string `yaml:"variant,omitempty" json:"variant,omitempty"`

// API used to download binary assets. If not specified, will take a guess based on location.
Expand Down Expand Up @@ -184,10 +184,11 @@ func parseGitLocation(loc string) (string, string, string, string, string, strin
func (m *SWModule) Normalize() error {
if m.Location == "" && m.OriginOld != "" {
m.Location = m.OriginOld
} else {
// Just for the compatibility with a bit older fwbuild
m.OriginOld = m.Location
}
if m.Location == "" {
return fmt.Errorf("location is not set")
}
m.OriginOld = ""
if m.Name == "" {
n, err := m.GetName()
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ sources:
filesystem:
- __APP_ROOT__/app/fs/myfile
modules:
- location: https://github.com/cesanta/mongoose-os
- name: mongoose-os
location: https://github.com/cesanta/mongoose-os
version: 1.2.3
name: mongoose-os
no_implicit_init_deps: true
build_vars:
BOARD: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ filesystem:
- __APP_ROOT__/libs/mylib2/fs/mylib2_file1
- __APP_ROOT__/libs/mylib3/fs/mylib3_file1
modules:
- location: https://github.com/cesanta/mongoose-os
- name: mongoose-os
location: https://github.com/cesanta/mongoose-os
version: "0.01"
name: mongoose-os
config_schema:
- - mylib1
- o
Expand Down Expand Up @@ -54,16 +54,14 @@ mongoose_os_version: "0.01"
manifest_version: "2017-09-29"
libs_handled:
- lib:
origin: https://github.com/mongoose-os-libs/core
location: https://github.com/mongoose-os-libs/core
name: core
location: https://github.com/mongoose-os-libs/core
path: __APP_ROOT__/libs/core
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib1
location: https://github.com/mongoose-os-libs/mylib1
name: mylib1
location: https://github.com/mongoose-os-libs/mylib1
path: __APP_ROOT__/libs/mylib1
init_deps:
- core
Expand All @@ -72,9 +70,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib2
location: https://github.com/mongoose-os-libs/mylib2
name: mylib2
location: https://github.com/mongoose-os-libs/mylib2
path: __APP_ROOT__/libs/mylib2
init_deps:
- core
Expand All @@ -83,9 +80,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib3
location: https://github.com/mongoose-os-libs/mylib3
name: mylib3
location: https://github.com/mongoose-os-libs/mylib3
path: __APP_ROOT__/libs/mylib3
init_deps:
- core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ filesystem:
- __APP_ROOT__/libs/mylib4/fs/mylib4_file1
- __APP_ROOT__/libs/mylib3/fs/mylib3_file1
modules:
- location: https://github.com/cesanta/mongoose-os
- name: mongoose-os
location: https://github.com/cesanta/mongoose-os
version: "0.01"
name: mongoose-os
config_schema:
- - mylib1
- o
Expand Down Expand Up @@ -62,16 +62,14 @@ mongoose_os_version: "0.01"
manifest_version: "2017-09-29"
libs_handled:
- lib:
origin: https://github.com/mongoose-os-libs/core
location: https://github.com/mongoose-os-libs/core
name: core
location: https://github.com/mongoose-os-libs/core
path: __APP_ROOT__/libs/core
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib1
location: https://github.com/mongoose-os-libs/mylib1
name: mylib1
location: https://github.com/mongoose-os-libs/mylib1
path: __APP_ROOT__/libs/mylib1
init_deps:
- core
Expand All @@ -81,9 +79,8 @@ libs_handled:
version: "0.01"
user_version: 1.2.3
- lib:
origin: https://github.com/mongoose-os-libs/mylib2
location: https://github.com/mongoose-os-libs/mylib2
name: mylib2
location: https://github.com/mongoose-os-libs/mylib2
path: __APP_ROOT__/libs/mylib2
init_deps:
- core
Expand All @@ -92,9 +89,8 @@ libs_handled:
- __APP_ROOT__/libs/mylib2/src/mylib2_src1.c
version: "0.01"
- lib:
origin: https://github.com/mongoose-os-libs/mylib4
location: https://github.com/mongoose-os-libs/mylib4
name: mylib4
location: https://github.com/mongoose-os-libs/mylib4
path: __APP_ROOT__/libs/mylib4
init_deps:
- core
Expand All @@ -103,9 +99,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib3
location: https://github.com/mongoose-os-libs/mylib3
name: mylib3
location: https://github.com/mongoose-os-libs/mylib3
path: __APP_ROOT__/libs/mylib3
init_deps:
- core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ filesystem:
- __APP_ROOT__/libs/mylib4/fs/mylib4_file1
- __APP_ROOT__/libs/mylib3/fs/mylib3_file1
modules:
- location: https://github.com/cesanta/mongoose-os
- name: mongoose-os
location: https://github.com/cesanta/mongoose-os
version: "0.01"
name: mongoose-os
config_schema:
- - mylib1
- o
Expand Down Expand Up @@ -62,16 +62,14 @@ mongoose_os_version: "0.01"
manifest_version: "2017-09-29"
libs_handled:
- lib:
origin: https://github.com/mongoose-os-libs/core
location: https://github.com/mongoose-os-libs/core
name: core
location: https://github.com/mongoose-os-libs/core
path: __APP_ROOT__/libs/core
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib1
location: https://github.com/mongoose-os-libs/mylib1
name: mylib1
location: https://github.com/mongoose-os-libs/mylib1
path: __APP_ROOT__/libs/mylib1
init_deps:
- core
Expand All @@ -80,9 +78,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib2
location: https://github.com/mongoose-os-libs/mylib2
name: mylib2
location: https://github.com/mongoose-os-libs/mylib2
path: __APP_ROOT__/libs/mylib2
init_deps:
- core
Expand All @@ -91,9 +88,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib4
location: https://github.com/mongoose-os-libs/mylib4
name: mylib4
location: https://github.com/mongoose-os-libs/mylib4
path: __APP_ROOT__/libs/mylib4
init_deps:
- core
Expand All @@ -102,9 +98,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib3
location: https://github.com/mongoose-os-libs/mylib3
name: mylib3
location: https://github.com/mongoose-os-libs/mylib3
path: __APP_ROOT__/libs/mylib3
init_deps:
- core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ description: My test app
sources:
- __APP_ROOT__/app/build/gen/mgos_deps_init.c
modules:
- location: https://github.com/cesanta/mongoose-os
- name: mongoose-os
location: https://github.com/cesanta/mongoose-os
version: "0.01"
name: mongoose-os
config_schema:
- - mylib2
- o
Expand Down Expand Up @@ -40,26 +40,23 @@ mongoose_os_version: "0.01"
manifest_version: "2017-09-29"
libs_handled:
- lib:
origin: https://github.com/mongoose-os-libs/core
location: https://github.com/mongoose-os-libs/core
name: core
location: https://github.com/mongoose-os-libs/core
path: __APP_ROOT__/libs/core
version: "0.01"
user_version: "1.0"
repo_version: deadbeef
- lib:
origin: libs/mylib2a
location: libs/mylib2a
name: mylib2
location: libs/mylib2a
path: __APP_ROOT__/libs/mylib2a
init_deps:
- core
version: "0.01"
user_version: "2.0"
- lib:
origin: libs/mylib1
location: libs/mylib1
name: mylib1
location: libs/mylib1
path: __APP_ROOT__/libs/mylib1
init_deps:
- core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ filesystem:
- __APP_ROOT__/libs/mylib4/fs/mylib4_file1
- __APP_ROOT__/libs/mylib3/fs/mylib3_file1
modules:
- location: https://github.com/cesanta/mongoose-os
- name: mongoose-os
location: https://github.com/cesanta/mongoose-os
version: "0.01"
name: mongoose-os
config_schema:
- - mylib1
- o
Expand Down Expand Up @@ -71,16 +71,14 @@ mongoose_os_version: "0.01"
manifest_version: "2017-09-29"
libs_handled:
- lib:
origin: https://github.com/mongoose-os-libs/core
location: https://github.com/mongoose-os-libs/core
name: core
location: https://github.com/mongoose-os-libs/core
path: __APP_ROOT__/libs/core
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib1
location: https://github.com/mongoose-os-libs/mylib1
name: mylib1
location: https://github.com/mongoose-os-libs/mylib1
path: __APP_ROOT__/libs/mylib1
init_deps:
- core
Expand All @@ -89,9 +87,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib2
location: https://github.com/mongoose-os-libs/mylib2
name: mylib2
location: https://github.com/mongoose-os-libs/mylib2
path: __APP_ROOT__/libs/mylib2
init_deps:
- core
Expand All @@ -100,9 +97,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib4
location: https://github.com/mongoose-os-libs/mylib4
name: mylib4
location: https://github.com/mongoose-os-libs/mylib4
path: __APP_ROOT__/libs/mylib4
init_deps:
- core
Expand All @@ -111,9 +107,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib3
location: https://github.com/mongoose-os-libs/mylib3
name: mylib3
location: https://github.com/mongoose-os-libs/mylib3
path: __APP_ROOT__/libs/mylib3
init_deps:
- core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ filesystem:
- __APP_ROOT__/libs/mylib4/fs/mylib4_file1
- __APP_ROOT__/libs/mylib3/fs/mylib3_file1
modules:
- location: https://github.com/cesanta/mongoose-os
- name: mongoose-os
location: https://github.com/cesanta/mongoose-os
version: "0.01"
name: mongoose-os
config_schema:
- - mylib1
- o
Expand Down Expand Up @@ -70,16 +70,14 @@ mongoose_os_version: "0.01"
manifest_version: "2017-09-29"
libs_handled:
- lib:
origin: https://github.com/mongoose-os-libs/core
location: https://github.com/mongoose-os-libs/core
name: core
location: https://github.com/mongoose-os-libs/core
path: __APP_ROOT__/libs/core
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib1
location: https://github.com/mongoose-os-libs/mylib1
name: mylib1
location: https://github.com/mongoose-os-libs/mylib1
path: __APP_ROOT__/libs/mylib1
init_deps:
- core
Expand All @@ -88,9 +86,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib2
location: https://github.com/mongoose-os-libs/mylib2
name: mylib2
location: https://github.com/mongoose-os-libs/mylib2
path: __APP_ROOT__/libs/mylib2
init_deps:
- core
Expand All @@ -99,9 +96,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib4
location: https://github.com/mongoose-os-libs/mylib4
name: mylib4
location: https://github.com/mongoose-os-libs/mylib4
path: __APP_ROOT__/libs/mylib4
init_deps:
- core
Expand All @@ -111,9 +107,8 @@ libs_handled:
version: "0.01"
user_version: "1.0"
- lib:
origin: https://github.com/mongoose-os-libs/mylib3
location: https://github.com/mongoose-os-libs/mylib3
name: mylib3
location: https://github.com/mongoose-os-libs/mylib3
path: __APP_ROOT__/libs/mylib3
init_deps:
- core
Expand Down
Loading

0 comments on commit 1aba408

Please sign in to comment.