You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/11/09 18:44:38 UTC
[1/3] incubator-mynewt-newt git commit: updated version string
Repository: incubator-mynewt-newt
Updated Branches:
refs/heads/develop 56b708d4f -> 6434dada6
updated version string
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/ef4522e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/ef4522e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/ef4522e2
Branch: refs/heads/develop
Commit: ef4522e229743556d6d82b74b503d19aa3be9070
Parents: 38b34ef
Author: David G. Simmons <sa...@mac.com>
Authored: Wed Nov 9 13:27:15 2016 -0500
Committer: David G. Simmons <sa...@mac.com>
Committed: Wed Nov 9 13:27:15 2016 -0500
----------------------------------------------------------------------
newt/newtutil/newtutil.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/ef4522e2/newt/newtutil/newtutil.go
----------------------------------------------------------------------
diff --git a/newt/newtutil/newtutil.go b/newt/newtutil/newtutil.go
index 0daa992..9b99010 100644
--- a/newt/newtutil/newtutil.go
+++ b/newt/newtutil/newtutil.go
@@ -29,8 +29,8 @@ import (
"mynewt.apache.org/newt/viper"
)
-var NewtVersionStr string = "Apache Newt (incubating) version: 0.9.0"
-var NewtBlinkyTag string = "mynewt_0_9_0_tag"
+var NewtVersionStr string = "Apache Newt (incubating) version: 1.0.0-develop"
+var NewtBlinkyTag string = "mynewt_1_0_0_develop_tag"
func GetStringFeatures(v *viper.Viper, features map[string]bool,
key string) string {
[3/3] incubator-mynewt-newt git commit: newt;
pull 'develop' blinky with this version of newt.
Posted by ma...@apache.org.
newt; pull 'develop' blinky with this version of newt.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/6434dada
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/6434dada
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/6434dada
Branch: refs/heads/develop
Commit: 6434dada6a47f885c0f6c76be13f3707cd74827a
Parents: a30bf2d
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Wed Nov 9 10:44:05 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed Nov 9 10:44:05 2016 -0800
----------------------------------------------------------------------
newt/newtutil/newtutil.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/6434dada/newt/newtutil/newtutil.go
----------------------------------------------------------------------
diff --git a/newt/newtutil/newtutil.go b/newt/newtutil/newtutil.go
index ddb2e94..d7369d9 100644
--- a/newt/newtutil/newtutil.go
+++ b/newt/newtutil/newtutil.go
@@ -34,7 +34,7 @@ import (
)
var NewtVersionStr string = "Apache Newt (incubating) version: 1.0.0-develop"
-var NewtBlinkyTag string = "mynewt_1_0_0_develop_tag"
+var NewtBlinkyTag string = "develop"
const NEWTRC_DIR string = ".newt"
const REPOS_FILENAME string = "repos.yml"
[2/3] incubator-mynewt-newt git commit: This closes #26.
Posted by ma...@apache.org.
This closes #26.
Merge branch 'develop' of https://github.com/davidgs/incubator-mynewt-newt into develop
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/a30bf2dc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/a30bf2dc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/a30bf2dc
Branch: refs/heads/develop
Commit: a30bf2dcfd9f44174549ab48eb290cfc6b042b17
Parents: 56b708d ef4522e
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Wed Nov 9 10:41:32 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed Nov 9 10:41:32 2016 -0800
----------------------------------------------------------------------
newt/newtutil/newtutil.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/a30bf2dc/newt/newtutil/newtutil.go
----------------------------------------------------------------------
diff --cc newt/newtutil/newtutil.go
index af949f0,9b99010..ddb2e94
--- a/newt/newtutil/newtutil.go
+++ b/newt/newtutil/newtutil.go
@@@ -33,86 -29,9 +33,86 @@@ import
"mynewt.apache.org/newt/viper"
)
- var NewtVersionStr string = "Apache Newt (incubating) version: 0.9.0"
- var NewtBlinkyTag string = "mynewt_0_9_0_tag"
+ var NewtVersionStr string = "Apache Newt (incubating) version: 1.0.0-develop"
+ var NewtBlinkyTag string = "mynewt_1_0_0_develop_tag"
+const NEWTRC_DIR string = ".newt"
+const REPOS_FILENAME string = "repos.yml"
+
+// Contains general newt settings read from $HOME/.newt
+var newtrc *viper.Viper
+
+func readNewtrc() *viper.Viper {
+ usr, err := user.Current()
+ if err != nil {
+ log.Warn("Failed to obtain user name")
+ return viper.New()
+ }
+
+ dir := usr.HomeDir + "/" + NEWTRC_DIR
+ v, err := util.ReadConfig(dir, strings.TrimSuffix(REPOS_FILENAME, ".yml"))
+ if err != nil {
+ log.Debugf("Failed to read %s/%s file", dir, REPOS_FILENAME)
+ return viper.New()
+ }
+
+ return v
+}
+
+func Newtrc() *viper.Viper {
+ if newtrc != nil {
+ return newtrc
+ }
+
+ newtrc = readNewtrc()
+ return newtrc
+}
+
+func GetSliceFeatures(v *viper.Viper, features map[string]bool,
+ key string) []interface{} {
+
+ val := v.Get(key)
+ vals := []interface{}{val}
+
+ // Process the features in alphabetical order to ensure consistent
+ // results across repeated runs.
+ var featureKeys []string
+ for feature, _ := range features {
+ featureKeys = append(featureKeys, feature)
+ }
+ sort.Strings(featureKeys)
+
+ for _, feature := range featureKeys {
+ overwriteVal := v.Get(key + "." + feature + ".OVERWRITE")
+ if overwriteVal != nil {
+ return []interface{}{overwriteVal}
+ }
+
+ appendVal := v.Get(key + "." + feature)
+ if appendVal != nil {
+ vals = append(vals, appendVal)
+ }
+ }
+
+ return vals
+}
+
+func GetStringMapFeatures(v *viper.Viper, features map[string]bool,
+ key string) map[string]interface{} {
+
+ result := map[string]interface{}{}
+
+ slice := GetSliceFeatures(v, features, key)
+ for _, itf := range slice {
+ sub := cast.ToStringMap(itf)
+ for k, v := range sub {
+ result[k] = v
+ }
+ }
+
+ return result
+}
+
func GetStringFeatures(v *viper.Viper, features map[string]bool,
key string) string {
val := v.GetString(key)