Skip to content
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

Support useful environment variables in west forall #144

Closed
mbolivar opened this issue Dec 19, 2018 · 5 comments
Closed

Support useful environment variables in west forall #144

mbolivar opened this issue Dec 19, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers priority: low
Milestone

Comments

@mbolivar
Copy link
Contributor

repo forall defines a useful set of environment variables for the duration of each call:

  • REPO_PROJECT is set to the unique name of the project.
  • REPO_PATH is the path relative to the root of the client.
  • REPO_REMOTE is the name of the remote system from the manifest.
  • REPO_LREV is the name of the revision from the manifest, translated to a local tracking branch. Used if you need to pass the manifest revision to a locally executed git command.
  • REPO_RREV is the name of the revision from the manifest, exactly as written in the manifest.

West forall should support equivalent features.

  • WEST_PROJECT: project name (or path in the case of the manifest repository in the new multirepo scheme?)
  • WEST_PATH: project path relative to the workdir root
  • WEST_ABSPATH: absolute project path
  • WEST_REMOTE_URL: the full URL of the remote as given in the manifest (since we use this internally instead of named remotes)
  • Note that REPO_LREV is not necessary because we have a manifest-rev branch which can always be used
  • WEST_MANIFEST_REVISION: equivalent to REPO_RREV
  • WEST_MANIFEST_BRANCH: manifest tracking branch, if given
@mbolivar mbolivar added enhancement New feature or request good first issue Good for newcomers priority: low labels Dec 19, 2018
@mkschreder
Copy link

It would also be nice to have something like "west forall-in-group" or something similar so that it is possible to run it only on a subset of projects.

mbolivar-nordic added a commit to mbolivar-nordic/west that referenced this issue Mar 10, 2023
This was requested by a user in a comment in issue zephyrproject-rtos#144.
The purpose is to make it easy to run commands on interesting subsets
of projects in a convenient way.

See help text for details.

Signed-off-by: Martí Bolívar <[email protected]>
@mbolivar-nordic
Copy link
Contributor

It would also be nice to have something like "west forall-in-group" or something similar so that it is possible to run it only on a subset of projects.

Like this? #641

@mbolivar-nordic
Copy link
Contributor

@mkschreder I'm going to wait to merge #641 until:

  1. you confirm it's what you're looking for
  2. after that, I have time to write some test cases

@mkschreder
Copy link

@mkschreder I'm going to wait to merge #641 until:

  1. you confirm it's what you're looking for
  2. after that, I have time to write some test cases

Very nice. Yes I think group is probably the right way to approach this for now. I suppose we can view groups as tags of sorts where we can for example have a group called "public" where all repositories in that group would have a public trunk counterpart where latest local main trunk can be pushed using forall git push public origin/main:main. Or some other similar scenario.

mbolivar-nordic added a commit to mbolivar-nordic/west that referenced this issue Mar 27, 2023
This was requested by a user in a comment in issue zephyrproject-rtos#144.
The purpose is to make it easy to run commands on interesting subsets
of projects in a convenient way.

See help text for details.

Signed-off-by: Martí Bolívar <[email protected]>
mbolivar-nordic added a commit to mbolivar-nordic/west that referenced this issue Mar 27, 2023
This was requested by a user in a comment in issue zephyrproject-rtos#144.
The purpose is to make it easy to run commands on interesting subsets
of projects in a convenient way.

See help text for details.

Signed-off-by: Martí Bolívar <[email protected]>
mbolivar-nordic added a commit that referenced this issue Mar 29, 2023
This was requested by a user in a comment in issue #144.
The purpose is to make it easy to run commands on interesting subsets
of projects in a convenient way.

See help text for details.

Signed-off-by: Martí Bolívar <[email protected]>
@marc-hb
Copy link
Collaborator

marc-hb commented Aug 28, 2024

This was just merged:

@pdgendt pdgendt self-assigned this Aug 30, 2024
@pdgendt pdgendt closed this as completed Aug 30, 2024
@pdgendt pdgendt added this to the v1.3.0 milestone Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority: low
Projects
None yet
Development

No branches or pull requests

5 participants