question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to execute post update script for every project

See original GitHub issue

Allow executing post-update scripts for every project.

manifest:
  ...
  projects:
    ...
    - name: test
      post-update: post-update.sh

Or

manifest:
  ...
  projects:
    ...
    - name: test
      post-update:
        - post_update1.sh
        - post_update2.sh

The script should be runned just after the update of the particular project and before next projects being updated. When multiple scripts are provided they should be executed in order of presence.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tejlmandcommented, Feb 12, 2020

just a small note on this. Although for sure a valuable feature, we must be very careful not to execute any arbitary code as part of west update. This could become a security risk on peoples machines.

Currently, commands invoked by users can be verified before execution, such as west update and west build, as the code for those commands are already available in the local system.

But users has no way of verifying code executed as post-update, if it is fetched and executed automatically.

Comparing to git, this is also why, users must install git-hooks themselves, and you cannot force a git-hook onto another persons machine.

1reaction
mbolivarcommented, Oct 8, 2019

Thanks! So you’re saying:

  • A == openthread
  • Dir_aa == vendor/drivers/802.15.4
  • openthread requires a literal copy of every driver in its main tree, so Dir_aa in upstream openthread is a latest stable version
  • you want to maintain an openthread downstream where Dir_aa is a beta version

I’m not sure this problem should be solved using west. That feels like bending over backwards to allow openthread to remain a monorepo project, instead of allowing its pluggable dependencies (such as 802.15.4 drivers) be maintained out of tree.

I would say that this monorepo requirement is the real problem here, and it is (predictably) leading to the usual version skew problems that come with such requirements. We designed west exactly to avoid having to deal with things like this in Zephyr.

Why not add a patch to the openthread build system to pick Dir_aa_stable or Dir_aa_beta in your downstream openthread instead? Perhaps using a cmake variable?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scripts - Composer
post -update-cmd: occurs after the update command has been executed, or after the install command has been executed without a lock file present....
Read more >
scripts - npm Docs
To create "pre" or "post" scripts for any scripts defined in the "scripts" section of the package.json , simply create another script with...
Read more >
ScriptRunner - Post Function to update Project Roles - YouTube
Yes it is possible to automatically add people to your project role using ScriptRunner for Jira. # ScriptRunner # ScriptPostFunction ...
Read more >
Examples for database update scripts using hook_update_N ...
You can leave one or several of the latest update hooks without problems. Whatever you might expect still needs to run on existing...
Read more >
hook_update_N or hook_post_update_NAME - matt glaman
post -update hooks run right after update_N hooks. ... Let's get digging ... Each hook_update_N implementation is placed into the batch ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found