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

what is build-commit for #25

Closed
UziTech opened this issue Aug 23, 2020 · 6 comments
Closed

what is build-commit for #25

UziTech opened this issue Aug 23, 2020 · 6 comments
Labels
question Further information is requested

Comments

@UziTech
Copy link
Member

UziTech commented Aug 23, 2020

What is build-commit for? It looks like that builds the dist folder and commits it except that the dist folder is in .gitignore so what exactly does build-commit do?

@aminya
Copy link
Member

aminya commented Aug 23, 2020

build-commit is a workaround for the apm limitation. When you run npm run build-commit or pnpm build-commit, the project is built, .gitignore is disabled temporarily, and the built files are committed to the git history. We need this because apm does not pack the built files similar to how npm does it.

If we use semantic releases the built files appear in the commit that the bot makes.

https://github.com/aminya/build-commit

@aminya aminya added the question Further information is requested label Aug 23, 2020
@UziTech
Copy link
Member Author

UziTech commented Aug 23, 2020

So apm doesn't run the prepare script when installing a package?

@aminya
Copy link
Member

aminya commented Aug 23, 2020

I am not sure. But this is the workaround I have come up with instead of checking in the built files.

We can fix the issue in apm though:
atom/apm#498

@UziTech
Copy link
Member Author

UziTech commented Aug 24, 2020

After some testing it looks like prepare doesn't get called but postinstall does. I don't see any disadvantages to just moving the prepare script to postinstall and we wouldn't need build-commit or the dist folder checked into the git repo.

@aminya
Copy link
Member

aminya commented Aug 24, 2020

@UziTech That means you rely on every user's computer to build the typescript and bundle the code. Currently, the dist file is what you built.

@UziTech
Copy link
Member Author

UziTech commented Aug 24, 2020

Good point

aminya referenced this issue in atom-community/autocomplete-paths Nov 25, 2020
@UziTech UziTech closed this as completed Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants