This is an automated email from the ASF dual-hosted git repository. naraj pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit c1597ec775eac659e43af58bad33972d404cb97f Author: MichaĆ Narajowski <michal.narajow...@codecoup.pl> AuthorDate: Thu May 28 11:58:56 2020 +0200 porting: Update targets and updating script We need to update pkg names to represent at path to the targets. Also update the update_generated_files.sh script to refer to the targets using a path. This is required after recent change to Newt. --- porting/targets/linux/pkg.yml | 2 +- porting/targets/linux_blemesh/pkg.yml | 2 +- porting/targets/porting_default/pkg.yml | 2 +- porting/targets/riot/pkg.yml | 2 +- porting/update_generated_files.sh | 9 +++++++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/porting/targets/linux/pkg.yml b/porting/targets/linux/pkg.yml index f1159d4..c819a83 100644 --- a/porting/targets/linux/pkg.yml +++ b/porting/targets/linux/pkg.yml @@ -16,7 +16,7 @@ # under the License. # -pkg.name: "targets/linux" +pkg.name: "porting/targets/linux" pkg.type: "target" pkg.description: This target is used to generate syscfg.h file and other artifacts for linux example app. pkg.author: diff --git a/porting/targets/linux_blemesh/pkg.yml b/porting/targets/linux_blemesh/pkg.yml index c314933..3cbe09a 100644 --- a/porting/targets/linux_blemesh/pkg.yml +++ b/porting/targets/linux_blemesh/pkg.yml @@ -16,7 +16,7 @@ # under the License. # -pkg.name: "targets/linux_blemesh" +pkg.name: "porting/targets/linux_blemesh" pkg.type: "target" pkg.description: This target is used to generate syscfg.h file and other artifacts for linux_blemesh example app. pkg.author: diff --git a/porting/targets/porting_default/pkg.yml b/porting/targets/porting_default/pkg.yml index f7319c2..44a34ba 100644 --- a/porting/targets/porting_default/pkg.yml +++ b/porting/targets/porting_default/pkg.yml @@ -16,7 +16,7 @@ # under the License. # -pkg.name: "targets/porting_default" +pkg.name: "porting/targets/porting_default" pkg.type: "target" pkg.description: This target is used to generate syscfg.h file and other artifacts for default Nimble port includes. pkg.author: diff --git a/porting/targets/riot/pkg.yml b/porting/targets/riot/pkg.yml index b6610c3..7d1a324 100644 --- a/porting/targets/riot/pkg.yml +++ b/porting/targets/riot/pkg.yml @@ -16,7 +16,7 @@ # under the License. # -pkg.name: "targets/riot" +pkg.name: "porting/targets/riot" pkg.type: "target" pkg.description: This target is used to generate syscfg.h file and other artifacts for RIOT Nimble port. pkg.author: diff --git a/porting/update_generated_files.sh b/porting/update_generated_files.sh index c01dddd..7ede02c 100755 --- a/porting/update_generated_files.sh +++ b/porting/update_generated_files.sh @@ -31,6 +31,11 @@ declare -A targets=( for target in "${!targets[@]}"; do echo "Updating target $target" - newt build "$target" > /dev/null 2>&1 - cp "bin/@apache-mynewt-nimble/targets/${target}/generated/include" "${targets[$target]}" -r + newt build "@apache-mynewt-nimble/porting/targets/$target" > /dev/null 2>&1 + cp "bin/@apache-mynewt-nimble/porting/targets/${target}/generated/include" "${targets[$target]}" -r + # Remove repo version and hash MYNEWT_VALS as it doesn't make much sense to commit them and they + # defeat the purpose of this script. + find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '/MYNEWT_VAL_REPO_*/,/#endif/d' {} \; + find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '/\/\*\*\* Repository/,/\*\//d' {} \; + find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '$!N;/^\n$/{$q;D;};P;D;' {} \; done