cargo-release icon indicating copy to clipboard operation
cargo-release copied to clipboard

post-release-replacements and hooks

Open tisonkun opened this issue 1 year ago • 5 comments

My scenario:

  • Pre-release: Change "latest" to "{{version}}".
  • Post-release: Change back to "latest".

So that my main branch will use "latest" automatically instead of requiring manually edition.

I'd firstly seek for a consensus and would try to implement it if desired. I suppose it's similar to the pre-release ones.

tisonkun avatar Mar 23 '24 17:03 tisonkun

Could you give an example of where you use latest that you need this kind of behavior?

epage avatar Mar 24 '24 02:03 epage

https://github.com/korandoru/hawkeye/blob/v5.1.0/release.py

@epage Currently I wrap the logic in a simple script. The logic is almost file content replacement.

Another issue is that the replacement/hook search path is always from package root which is not quite suitable for workspace case. But this is not a blocked for me since the action is idempotent and I can use "../xxx"

tisonkun avatar Mar 24 '24 04:03 tisonkun

The original motivation vanished because I change image: ...[{{version}}|latest] to image: Dockerfile.

But this issue may be still relevant.

UPDATE - No. Pull is much faster and build in place.

tisonkun avatar Mar 24 '24 14:03 tisonkun

So in your case, you have a github action that references a docker image on dockerhub. Within the tagged release, you want to reference the tagged docker image. Outside of the tagged release, you want to reference an edge image.

Did I get that right?

epage avatar Mar 25 '24 15:03 epage

Yes.

tisonkun avatar Mar 25 '24 15:03 tisonkun