-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add script for converting Zephyr repository #394
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
copy_git_worktree() { | ||
echo $1 $2 | ||
rsync -q -av $1 --exclude .git $2 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reasoning behind two Git directories? Could you use a single one instead and generate tags on it which have a prefix/suffix?
So maybe upstream pushes v1.0
and we add a new local tag called elixir-v1.0
(or whatever). Then the upper layers only pick those tags up?
utils/zephyr-converter.sh
Outdated
west_manifest=$TOP_DIR/$PROJECT_NAME/west.yml | ||
if [[ -f $west_manifest ]]; then | ||
# Find disabled groups | ||
extra_groups=`cat west-topdir/zephyr/west.yml | yq -r '(.manifest."group-filter" // [])[]' | grep '^-' | sed 's/^-/+/' | paste -s -d,` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Python for YAML manipulation? This pipeline is hardly readable. eg
x='
import yaml
import sys
x = yaml.safe_load(sys.stdin)
# ...'
extra_groups="$(python -c "$x" < west-topdir/zephyr/west.yml)"
a086530
to
3c1af40
Compare
3c1af40
to
42ed877
Compare
This is a work-in-progress version of Zephyr repository converter discussed in #279. It's not integrated with Elixir in any way yet, I'm not sure what would the best way to approach this. For now, probably the
utils/index
script could "inherit" functions fromprojects
directory scripts, likescript.sh
does. Zephyr-specific repository conversion part could be then placed inprojects/zephyr.sh
.The script does not try to properly order commits in the target repository, I don't think it matters for Elixir.
In this version, all the extra projects are placed in
west_projects
directory. West by default places project directories in directory above Zephyr, but that is not going to work for Elixir, because it would break URLs.All west groups disabled in the manifest are enabled.
I have no experience with Zephyr, so I don't know if this makes sense.