-
Notifications
You must be signed in to change notification settings - Fork 0
Finish everything up #4
Comments
I never used
Could you be more specific? Is it an issue related to using
If a binary as to be installed, I think it's out of the scope of |
Yes, it's related to the integration test. Since I still haven't quite understood how apm works aside from the REST API and have zero experience with integration testing, I have no clue how to tackle it.
Yes, I think so too. The |
I don't know either. Maybe you can try with https://github.com/npm/npm-docker-couchdb ? Maybe with http://www.mock-server.com/ (I use it in
According to https://github.com/atom/ci it seems that running apm on a CI server is a bit more complicated than just having the |
Also while Googling I found https://github.com/Adezandee/last-release-apm |
I wasn't aware of it so far, but I was able to get some inspiration from it like how to get the Git head of the last release (0ad0056). However, I'm not thinking about joining efforts with the author because that would probably become quite complicated communication-wise. |
For information, if the So if you retrieve the gitHead only based on a git tag, that unnecessary, you can return only a version and |
Okay, I removed the commit. I also investigated what exactly
The two steps marked with This also makes me think that we only need to mock the Atom and the GitHub API since there's no actual npm registry involved. |
Yes that's the good solution
I think the best approach for this type of situation will be for plugins to check if the tag already exist (the github plugin should do at some point I think).
My understand is that the Atom API is actually an NPM registry. Maybe a customized one. Which is why I mentionned https://github.com/npm/npm-docker-couchdb. But I might be wrong |
I just tested a few things and found that ...
I also don't think it's an npm registry because of one major difference: apm is dependent on GitHub and mirrors/proxies the release tarballs generated by it. You cannot upload files to apm like you can with npm. I also just found out that it's possible to specify a execa('apm', ['publish', '--tag', 'v' + nextRelease]) Right? Has |
From publish.coffee#L33
So you should just do write the version in the
They mention apm#relation-to-npm that they bundle npm so I assumed the registry would be the same. |
I just experimented a bit with This brings up a few new questions:
|
@pvdlg Any thoughts on this? ⬆️ |
Sorry I missed your previous message.
Can you confirm that if you run What happen if the tag doesn't exists and you run If the tag need to exists for
Ideally we would have something like that:
I'll give you an example when I release the
Yes, all CI I'm aware of accept [skip ci]. Example to come with the |
I just tried something and am very confused. Is this |
The error come from here. It seems Can you try the same thing, but wait like 15-10 second between the |
I tried it again just now, the tag still can't be found ... |
That's really weird...Maybe open a bug with |
The issue I opened has now been resolved.
Since it works now, yes. |
I just wanted to try to publish my
"release": {
"verifyConditions": ["@semantic-release/apm"],
"verifyRelease": ["@semantic-release/apm"],
"getLastRelease": ["@semantic-release/apm"],
"publish": ["@semantic-release/apm"]
}
@pvdlg Is there anything I forgot to configure or is it currently impossible to not use |
It seems you are using an old version of |
Did that. Running |
The logs you have listed definitely come from an old version. I guess you are using the globally install version which is old. |
With "Did that." I meant that I now use the new version. I just changed it.
I run |
|
I just the command and got this error:
This is weird since |
This is because your code use callback: https://github.com/shroudedcode/semantic-release-apm/blob/master/index.js#L31 |
Oops ... that happens when you clone someone's repository and not look at all of the code before making changes. Fixed that now. The problem I'm having now is the following:
I logged the result of |
Maybe you have a |
If they reference different commits, it shouldn't be a problem. I don't know why |
I've deleted, unpublished and recreated the example repository and tried to run
It now fails because APM can't find the tag (which was to expect). @pvdlg, how can I modify the config to make |
I would suggest to either let It would probably be problematic to have your plugin relying on another one, as if users do not use that plugin you are relying on it would fail. If I remember well, |
Running
Running
It prompts you to enter your GitHub username and password. Then it creates a While it seems like the easiest solution would be to just run
The other option would be to manually ...
@pvdlg What do you think? |
This Is doing the commit necessary for apm packages to work? |
So, yes.
They are downloaded from the repository,
|
That's going to make things very tricky then as you will need write access to the repo to make the commit, which is not necessary easy on a CI. You can see all the shenanigans I'm doing on the I think you can model a lot of the plugin after the
Check this part of the git plugin. Another entirely different solution:
That would mean there is no need for a specific {
"release": {
"verifyConditions": ["@semantic-release/condition-travis", "@semantic-release/git", "@semantic-release/github"],
"getLastRelease": "@semantic-release/git",
"publish": [
{
"path": "@semantic-release/git",
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
},
{
"path": "@semantic-release/exec",
"cmd": "apm publish ${nextRelease.version} --tag ${nextRelease.gitTag}",
},
"@semantic-release/github"
]
}
} I'm not sure if the The "@semantic-release/exec": "semantic-release/exec#initial-release" |
@pvdlg The solution you suggested seems to work until
|
It seems |
Awesome! 😸 The problem now is that
|
Ah yeah... {
"release": {
"verifyConditions": ["@semantic-release/condition-travis", "@semantic-release/npm", "@semantic-release/git", "@semantic-release/github"],
"getLastRelease": "@semantic-release/git",
"publish": [
{
"path": "@semantic-release/npm",
"npmPublish": false
},
{
"path": "@semantic-release/git",
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
},
{
"path": "@semantic-release/exec",
"cmd": "apm publish ${nextRelease.version} --tag ${nextRelease.gitTag}",
},
"@semantic-release/github"
]
}
} You might have to set up an |
Yes, it works! 🎉But this solution uses too many (mostly unused) plugins and too much configuration. Putting only the code that's needed for it to work into a separate package would be much better. Could you maybe do that? You've developed/contributed to all four of them, so it should a lot easier for you. |
All the plugin are used. Also we are going to support shareable config soon: semantic-release/semantic-release#553 Maybe I can create a I'm not so sure about creating an What do you think about "release": {
"extends": "@semantic-release/apm-config"
} |
I know. What I meant was that most of the code of these plugins is not used, because we only use certain features of them.
That would certainly make it easier to use, but there's still a lot of unnecessary code being downloaded and everyone using it would have to manually install all of the necessary plugins. |
Yes and no. Most of the plugin used are already there as they are dependencies of Regarding unused code, I don't think it's really a problem. You'd end up with a few bytes or kilobytes more in your In addition, having a few additional bytes/kilobytes in your |
Got it. Let's make |
I'm going to look into it. Ideally I'd like to use it to make a good and comprehensive example of a shareable config, so folks could fork it to make other shareable configs. I'll keep you posted and ask for help/feedback. It was nice to work with you and experiment around |
Thanks a lot for helping me with this, just mention me if you need feedback or help! 🐱 |
The core functionality is now implemented, but there's still a lot to do:
apm
(atom-package-manager
) on their build serverTagging @pvdlg and @gr2m for feedback and help.
The text was updated successfully, but these errors were encountered: