简体   繁体   中英

How to define a package's version in a DUB project

I know how to specify version requirements for imported packages in D/DUB project using the list of dependencies in the dub.json file.

But: how do I define the version of a package in it's on dub.json file in the first place?

It's managed automatically. If you publish your Github repo to DUB registry, it will fetch all of your version tags from it. See: http://code.dlang.org/publish

Git tags are the way used for package versioning.

To add version v1.0 , for example, create a git tag using the following command: git tag v1.0 . Dub understands tags as versions for local and online repositories.

I know of no other way to specify versions.

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