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

Don't rebuild default targets without --force #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

idbrii
Copy link
Contributor

@idbrii idbrii commented Mar 31, 2021

Fix makelove will rebuild default targets.

prepare_build_directory aborts the build if we're rebuilding targets
(unless forced). It checked input targets and not default targets, so it
wouldn't abort for any targets that are only built as defaults.

Now we get the full target list first before doing any checks.

Fix `makelove` will rebuild default targets.

prepare_build_directory aborts the build if we're rebuilding targets
(unless forced). It checked input targets and not default targets, so it
wouldn't abort for any targets that are only built as defaults.

Now we get the full target list first before doing any checks.
@pfirsich
Copy link
Owner

I'm so sorry, but I am not sure if I understand the issue correctly. You are doing versioned builds right? And if you try to rebuild a version + target combination that has already been built, without passing --force, it should error out. But if you don't pass a target explicitly, it will not error out, but instead silently rebuild the default targets, right? And you think (I probably agree), that it should error out as well, unless --force is passed?

@idbrii
Copy link
Contributor Author

idbrii commented Sep 4, 2021

Yeah, that's right. Example:

Before

$ makelove --version-name 1.0.1751380
Loading config from default path 'makelove.toml'
Found conf.lua
Assuming default löve version '11.3'
Building version '1.0.1751380'
Building targets: win32
Assembling game directory..
Created build\1.0.1751380\love\game.love
>> Building target win32
No love binaries specified for target win32
Love binaries already present in 'C:\blah\makelove\Cache\love-binaries\11.3\win32'
Target win32 complete

Versioned build overwritten!

After fix-rebuild-default-targets

$ makelove --version-name 1.0.1751380
Loading config from default path 'makelove.toml'
Found conf.lua
Assuming default löve version '11.3'
Building version '1.0.1751380'
Cannot rebuild an already built version + target combination. Remove it manually first or pass --force to overwrite it

$ makelove --version-name 1.0.1751380 --force
Loading config from default path 'makelove.toml'
Found conf.lua
Assuming default löve version '11.3'
Building version '1.0.1751380'
Building targets: win32
Assembling game directory..
Created build\1.0.1751380\love\committhebad.love
>> Building target win32
No love binaries specified for target win32
Love binaries already present in 'C:\blah\makelove\Cache\love-binaries\11.3\win32'
Target win32 complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants