将我的 public NPM 包从 Bitbucket 移动到 Github
Moving my public NPM package from Bitbucket to Github
我比 Github 更喜欢 Bitbucket,但遗憾的是,Bitbucket 的持续集成选项很少。
有问题的包是我写的,目前托管在 Bitbucket 上:
我希望在不破坏任何内容的情况下将这些移动到 Github。恐怕更改存储库数据还不够。
"repository": {
"type": "git",
"url": "https://StephanBijzitter@bitbucket.org/skelware/grunt-asset-compress.git"
},
图像用户安装了 1
版本,该版本托管在 Bitbucket 上。
然后我将版本更改为 2
并将 URL 更改为 Github URL。
我继续推送到 Github 和 Bitbucket。
如果用户更新,他将更新到 2
版本,该版本现在包括 Github 的 URL。
我在 Github 上推送了更多修复和发布版本 3
,用户再次更新,一切正常。
但是,如果用户在版本 3
发布之前没有更新到版本 2
怎么办? NPM 可能会尝试从 Bitbucket 下载版本 3
,因为这是 URL 在版本 1
!
中指向的内容
我不想让存储库保持同步;我希望能够在某一时刻将 Bitbucket 存储库设为私有,以便在 public 视图中将其隐藏,而 Github 存储库将自行提供服务。
我需要采取哪些步骤才能迁移到 Github,而不会破坏我的软件包的(尽管有限)用户的更新系统?
刚刚收到 NPM 本身的回复:
Hi, Stephan.
Thanks for the question. I'm hoping I can help...if I'm understanding
your inquiry correctly.
What ever you publish to npm is held within our own repository and
that is what's served to a user when they install your package. The
inclusion of the repository url, bitbucket or github, is more
informational as opposed to functional. Regardless of when you push
changes to github, the user that installs your package will get your
latest publish to npm. In other words, those two things may be in
different states and at different versions.
Please let me know if I'm off base. I'll be here to help. Ernie
换句话说,就我而言,我可以删除整个 Bitbucket 存储库并且不会破坏任何东西,因为副本托管在他们的服务器上,供通过 NPM 下载它的每个人使用。
谢谢你,厄尼!
我比 Github 更喜欢 Bitbucket,但遗憾的是,Bitbucket 的持续集成选项很少。
有问题的包是我写的,目前托管在 Bitbucket 上:
我希望在不破坏任何内容的情况下将这些移动到 Github。恐怕更改存储库数据还不够。
"repository": {
"type": "git",
"url": "https://StephanBijzitter@bitbucket.org/skelware/grunt-asset-compress.git"
},
图像用户安装了 1
版本,该版本托管在 Bitbucket 上。
然后我将版本更改为 2
并将 URL 更改为 Github URL。
我继续推送到 Github 和 Bitbucket。
如果用户更新,他将更新到 2
版本,该版本现在包括 Github 的 URL。
我在 Github 上推送了更多修复和发布版本 3
,用户再次更新,一切正常。
但是,如果用户在版本 3
发布之前没有更新到版本 2
怎么办? NPM 可能会尝试从 Bitbucket 下载版本 3
,因为这是 URL 在版本 1
!
我不想让存储库保持同步;我希望能够在某一时刻将 Bitbucket 存储库设为私有,以便在 public 视图中将其隐藏,而 Github 存储库将自行提供服务。
我需要采取哪些步骤才能迁移到 Github,而不会破坏我的软件包的(尽管有限)用户的更新系统?
刚刚收到 NPM 本身的回复:
Hi, Stephan.
Thanks for the question. I'm hoping I can help...if I'm understanding your inquiry correctly.
What ever you publish to npm is held within our own repository and that is what's served to a user when they install your package. The inclusion of the repository url, bitbucket or github, is more informational as opposed to functional. Regardless of when you push changes to github, the user that installs your package will get your latest publish to npm. In other words, those two things may be in different states and at different versions.
Please let me know if I'm off base. I'll be here to help. Ernie
换句话说,就我而言,我可以删除整个 Bitbucket 存储库并且不会破坏任何东西,因为副本托管在他们的服务器上,供通过 NPM 下载它的每个人使用。
谢谢你,厄尼!