Comments (12)
excellent! I will close this issue it out then.
from azure-devops-go-api.
@bvwells , sorry about that. This should be fixed now.
from azure-devops-go-api.
@tedchamb thanks for looking at this, but unfortunately it is still not possible to use semantic versions of the repo when importing.
As the module file (go.mod) is not at the root of the repo, the git tags have to be of the form 'azuredevops/vx.x.x'. Here the prefix 'azuredevops' in the git tag refers to the path to the module within the git repo.
For example, suppose we have a module example.com/repo/sub/v2, and we want to publish version v2.1.6. The repository root corresponds to example.com/repo, and the module is defined in sub/v2/go.mod within the repository. The prefix for this module is sub/. The full tag for this release should be sub/v2.1.6.
https://github.com/golang/go/wiki/Modules#publishing-a-release
from azure-devops-go-api.
Also, note that the git tag has to have a 'v' in front of the version to work correctly. The only git tag I could find is '1.0.0b1' which would have to be of the form 'azuredevops/v1.0.0b1' to work correctly.
Is it possible to reopen this issue please?
from azure-devops-go-api.
@bvwells, I have added the v
and the -
:
https://github.com/microsoft/azure-devops-go-api/releases/tag/v1.0.0-b1
let me know if that doesn't work for you.
from azure-devops-go-api.
@tedchamb - thanks for updating. Still not quite working as the semantic version is not quite right.
The tag 'azuredevops/v1.0.0b1' should be 'azuredevops/v1.0.0-b1'.
from azure-devops-go-api.
@bvwells, the tag I added yesterday that I thought should work was v1.0.0-b1
. This was based off the tag suggested by these articles:
https://semver.org/spec/v2.0.0.html
https://blog.golang.org/publishing-go-modules
https://dave.cheney.net/2016/06/24/gophers-please-tag-your-releases
Can you point me to the spec that has the prefix: 'azuredevops/'
Thanks for your help,
Ted
from azure-devops-go-api.
@tedchamb the reference for this is the link I posted above:
For example, suppose we have a module example.com/repo/sub/v2, and we want to publish version v2.1.6. The repository root corresponds to example.com/repo, and the module is defined in sub/v2/go.mod within the repository. The prefix for this module is sub/. The full tag for this release should be sub/v2.1.6.
https://github.com/golang/go/wiki/Modules#publishing-a-release
A tag of the form v1.0.0-b1 is only useful if there is a module defined at the root of the repo. In this repo there is no module so the tag doesn't really make sense for a module. This the normal setup for a module and is probably why most of the documentation does not mention the use of a subdirectory in the git tag.
If a module is nested in a sub-directory the tag must include the path in the tag to be correctly versioned.
As an example see https://github.com/googleapis/google-cloud-go. This repo has the following structure
- repo
- subdirectory1
- go.mod
- ...
- subdirectory2
- go.mod
- ...
- go.mod
- ....
- subdirectory1
The repo contains a root go module and each sub-directory contains it's own module. The repo has a mixture of tags, some of the form vx.x.x and some of the form subfolder/vx.x.x. This allows consumers to independently import each module within the repo.
At the moment I get this when I try to import:
go get -v github.com/microsoft/azure-devops-go-api/[email protected]
go: finding github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b1
Fetching https://github.com?go-get=1
Parsing meta tags from https://github.com?go-get=1 (status code 200)
go get github.com/microsoft/azure-devops-go-api/[email protected]: unknown revision azuredevops/v1.0.0-b1
from azure-devops-go-api.
From the original vgo paper there is also this.
In the major subdirectory convention, v2/ contains the module "my/thing/v2". A natural extension is to allow subdirectories not named for major versions. For example, we could add a blue/ subdirectory that contains the module "my/thing/blue", confirmed by a blue/go.mod file with that module path. In this case, the source control commit tags addressing that module would take the form blue/v1.x.x. Similarly, the tag blue/v2.x.x would address the blue/v2/ subdirectory. The existence of the blue/go.mod file excludes the blue/ tree from the outer my/thing module.
https://research.swtch.com/vgo-module#multiple-module_repositories
from azure-devops-go-api.
@bvwells , thanks for the info. Sorry for the slow response. I have added the tag with the prefix azuredevops/v1.0.0-b1
. Can you try it now? If that doesn't work for you, I can dig deeper next week, as I have some other time sensitive work to do this week. Thanks for your patience.
https://github.com/microsoft/azure-devops-go-api/releases/tag/azuredevops%2Fv1.0.0-b1
from azure-devops-go-api.
@tedchamb thanks very much for taking another look at this and no worries about response time. I've had conversations on issues over years in the past so this is pretty good! :-)
It is now working perfectly!
$ go get -v github.com/microsoft/azure-devops-go-api/azuredevops
go: github.com/microsoft/azure-devops-go-api/azuredevops upgrade => v1.0.0-b1
go: downloading github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b1
github.com/microsoft/azure-devops-go-api/azuredevops
Great work!
Ben
from azure-devops-go-api.
@tedchamb, thanks for all your help!
from azure-devops-go-api.
Related Issues (20)
- This repo is missing important files
- v6 + v7 pipelines module don't return continuationToken
- Get user status (active/inactive) - inactive field is deprecated.
- Support for `tokens/pats` API methods HOT 2
- v7 create service endpoint missing project name field in argument.
- Alternative of PAT for authentication? HOT 1
- Unable to create Pipeline: Value cannot be null. Parameter name: Path HOT 3
- [Feature Request] Add support to list and manage service principals identities
- Add pipeline configuration details in pipeline client
- [Feature Request] Include pipeline data in Approval object in v7 pipeline approvals
- [Feature Request] Include Security Role Assignment HOT 3
- TFVC ChangeSet changes api doesn't support pagination in the request Input. HOT 1
- Graph::ListUsers API Fails to Return `IsDeletedInOrigin` Property Value
- Question: Is it possible to retrieve a list of all repositorys and their clone urls of a project? HOT 1
- How to customize the http.client? HOT 1
- [V7] ReadIdentities doens't work as intended
- [V7] GetSelf panic
- Resource interface{} structure
- GetPolicyConfigurations returns a continuationToken but it is not taking the token back in the request
- API resource area Id <area-id> is not registered on https://dev.azure.com/<organization>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-devops-go-api.