-
Notifications
You must be signed in to change notification settings - Fork 297
WIP: Add prepublish and postpublish scripts support to apm publish #376
base: master
Are you sure you want to change the base?
Conversation
See atom#372. Prepublish and Postpublish scripts in package.json file
Would some of the maintainers of Atom / apm be able to give me some points on the questions above? Thanks in advance! |
For both of these, you can create a repository locally that satisfies these conditions, and check it in to
Yup, as long as |
So in the case of the Package being on GitHub, wouldn't a new tag be pushed every single time the tests are successfully run? I was thinking along the lines of giving the repo a fake |
Question about potential usage... Any chance I could write a prepublish script that would use git log to fake up a new entry in the CHANGELOG and open it in an editor? Then, when I save the changelog entry, the package would be published as usual. |
@bronson: Absolutely! This will wait until the prepublish script returns with it's exit code and will only continue afterwards if it was successful. That's a good use case. Personally, I will be using this for running a task for documentation generation before publishing. |
Hey @Glavin001 any update on this? Do you need help? |
Just a side question: Why are we using the callback-hell when promises are available? |
@iam4x : I have not made any progress since my last commit. Any help would be appreciated. Unfortunately, I am now studying for my university final exams and will not have much time to work on this in the next few weeks. @steelbrain : I would definitely prefer to use promises! 👍 |
Shouldn't this be expanded to include all relevant hooks? For example |
I have noticed that Visual Studio Code prefixes its |
Could you fix the conflicts? This seems like a very critical feature that is missing from apm. Other features can be added in a separate PR. |
See #372
I need some help writing the specs:
git init
to make the temporary directory a Git repository and then it would no longer error withPackage must be in a Git repository before publishing...
?Package must pushed up to GitHub before publishing
?publish
and it will not attempt to publish to the globalapm
API becauseATOM_API_URL
is set tohttp://localhost:3000/api
?TODO:
apm publish
prepublish
scriptPrepublish #{pack.name} for #{version} release
publish
as normal, which includes incrementing version and publishing toapm
APIpostpublish
if all successfulpublish
prepublish
with successprepublish
with errorpostpublish