简体   繁体   中英

Using go modules with Plastic SCM

How would one go about setting up private go modules when using Plastic SCM as the version control system?

Specifically I am talking about making commands like go get work when the module is under PlasticSCM vcs:

$ go get myorg.com/foo/bar

From the Go docs , the built-in tooling only supports:

Bazaar      .bzr
Fossil      .fossil
Git         .git
Mercurial   .hg
Subversion  .svn

One thing that possibly could work is to enable Plastic GitServer , although I'm not sure how to host that on a remote url myorg.com/foo/bar that works with the Go tooling. However, I am running Plastic SCM Cloud Edition, which does not have GitServer as an option (only Enterprise edition has it).

So I am boiling it down to these options:

  1. Pay for Plastic SCM Enterprise and enable GitServer, then figure out go module linking through some proxy or similar
  2. Add git version control to the repo and host it privately on Github, in addition to Plastic SCM, and use the somewhat cumbersome and non-automated GitSync from Plastic to keep them in sync
  3. Open for suggestions...?

While not as nice as the built-in go module system, vendoring is still supported, like like the pre 1.11 days. Vendoring inter-operates with go modules so you only have to do this for your private dependencies.

This does require you to use additional tools or scripts in your repo to download your dependencies. You could also use the Plastic SCM equivalent of git submodules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM