scripts/BuildScripts/BuildCommon.mk: unique names for development images #248

Open
austin987 wants to merge 1 commit from austin987/dev-image-unique into master
austin987 commented 2020-12-01 13:25:56 +01:00 (Migrated from github.com)

For your consideration.

I often have a few branches in play, and end up manually renaming images when testing something. Got tired of that, came up with this, figured I'd upstream it. If not interested, no worries, I'll maintain it locally.

For your consideration. I often have a few branches in play, and end up manually renaming images when testing something. Got tired of that, came up with this, figured I'd upstream it. If not interested, no worries, I'll maintain it locally.
SolidEva (Migrated from github.com) reviewed 2020-12-01 13:25:56 +01:00
SolidEva commented 2020-12-02 02:30:27 +01:00 (Migrated from github.com)

I think this is a great improvement! definitely handy.
FYI it breaks ci since the images end up as different names, I'll take care of it after the merge though.

I think this is a great improvement! definitely handy. FYI it breaks ci since the images end up as different names, I'll take care of it after the merge though.
SolidEva commented 2020-12-02 02:36:58 +01:00 (Migrated from github.com)

hmm, maybe CI doesn't end up with a branch name? This is the image name it ends up with:
PrawnOS-Shiba-armhf-git--3870b05651d1aac4b9a05fd23fc8b8aff30cf1b0.img
that double - indicates to me PRAWNOS_GIT_BRANCH is empty

hmm, maybe CI doesn't end up with a branch name? This is the image name it ends up with: `PrawnOS-Shiba-armhf-git--3870b05651d1aac4b9a05fd23fc8b8aff30cf1b0.img` that double - indicates to me `PRAWNOS_GIT_BRANCH` is empty
SolidEva commented 2020-12-02 02:47:58 +01:00 (Migrated from github.com)

Seems github CI doesn't use a branch, and instead just has a checkout at the sha.
Could you add a case to catch this situation? maybe if the PRAWNOS_GIT_BRANCH variable is empty, set it as NOBRANCH? I'm open to other suggestions here.

Second request: could you modify build-image.sh and the github workflows to match this new naming scheme?

Final thought: What happens if the image is built on a sha but there are a bunch of uncommitted changes? Could we indicate somehow that its a modified version of that sha? This isn't required at all, more just an idea.

Thanks again for this. I think this change makes a lot of sense overall. :)

Seems github CI doesn't use a branch, and instead just has a checkout at the sha. Could you add a case to catch this situation? maybe if the `PRAWNOS_GIT_BRANCH` variable is empty, set it as `NOBRANCH`? I'm open to other suggestions here. Second request: could you modify `build-image.sh` and the github workflows to match this new naming scheme? Final thought: What happens if the image is built on a sha but there are a bunch of uncommitted changes? Could we indicate somehow that its a modified version of that sha? This isn't required at all, more just an idea. Thanks again for this. I think this change makes a lot of sense overall. :)
austin987 commented 2020-12-02 06:36:13 +01:00 (Migrated from github.com)

Sure, I'll take a look.

I ignored the CI failures since it's been broken so much lately (I know I originally added it, and I do care, but as you pointed out before, it's not currently reliable, so I didn't consider it a blocker).

At some point I may look at moving to a container based solution, but I have other things I'd like to see done first (and when I tried in containers, things didn't work so well either for me, maybe it's improved since then).

Sure, I'll take a look. I ignored the CI failures since it's been broken so much lately (I know I originally added it, and I do care, but as you pointed out before, it's not currently reliable, so I didn't consider it a blocker). At some point I may look at moving to a container based solution, but I have other things I'd like to see done first (and when I tried in containers, things didn't work so well either for me, maybe it's improved since then).
SolidEva commented 2020-12-03 19:55:37 +01:00 (Migrated from github.com)

I actually fixed the CI a week or so ago, so it should be reliable again :)

I actually fixed the CI a week or so ago, so it should be reliable again :)
austin987 commented 2020-12-08 19:19:14 +01:00 (Migrated from github.com)

Note: as they're semi-related, continuing discussion on #250.

Note: as they're semi-related, continuing discussion on #250.
This pull request has changes conflicting with the target branch.
  • scripts/BuildScripts/BuildCommon.mk
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin austin987/dev-image-unique:austin987/dev-image-unique
git switch austin987/dev-image-unique

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff austin987/dev-image-unique
git switch austin987/dev-image-unique
git rebase master
git switch master
git merge --ff-only austin987/dev-image-unique
git switch austin987/dev-image-unique
git rebase master
git switch master
git merge --no-ff austin987/dev-image-unique
git switch master
git merge --squash austin987/dev-image-unique
git switch master
git merge --ff-only austin987/dev-image-unique
git switch master
git merge austin987/dev-image-unique
git push origin master
Sign in to join this conversation.
No description provided.