[ 
https://issues.apache.org/jira/browse/COMMONSSITE-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16478307#comment-16478307
 ] 

Rob Tompkins edited comment on COMMONSSITE-111 at 5/17/18 12:43 AM:
--------------------------------------------------------------------

I'm wrong there, but you can get it this way:

{code}
curl -u apacheId:pwd -H 'Accept:application/json' -H 'Content-Type: 
application/json; charset=utf-8' 
https://repository.apache.org/service/local/all_repositories >> out.json
{code}

Given that out.json is a single element {{data}} containing an array of 
"repositories" of the form:

{code:json}
{
      "resourceURI": 
"https://repository.apache.org/service/local/repositories/orgapachecommons-1327";,
      "id": "orgapachecommons-1327",
      "name": "orgapachecommons-1327 (staging: open)",
      "repoType": "hosted",
      "repoPolicy": "RELEASE",
      "provider": "maven2",
      "providerRole": "org.sonatype.nexus.proxy.repository.Repository",
      "format": "maven2",
      "userManaged": false,
      "exposed": false,
      "effectiveLocalStorageUrl": 
"file:/x1/nexus-work/storage/orgapachecommons-1327/"
    }
{code}

We could then iterate over them and get the largest number after 
{{orgapachecommons}} from the name field?


was (Author: chtompki):
I'm wrong there, but you can get it this way:

{code}
curl -u apacheId:pwd -H 'Accept:application/json' -H 'Content-Type: 
application/json; charset=utf-8' 
https://repository.apache.org/service/local/all_repositories >> out.json
{code}

Given that out is a single element {{data}} containing an array of 
"repositories" of the form:

{code:json}
{
      "resourceURI": 
"https://repository.apache.org/service/local/repositories/orgapachecommons-1327";,
      "id": "orgapachecommons-1327",
      "name": "orgapachecommons-1327 (staging: open)",
      "repoType": "hosted",
      "repoPolicy": "RELEASE",
      "provider": "maven2",
      "providerRole": "org.sonatype.nexus.proxy.repository.Repository",
      "format": "maven2",
      "userManaged": false,
      "exposed": false,
      "effectiveLocalStorageUrl": 
"file:/x1/nexus-work/storage/orgapachecommons-1327/"
    }
{code}

We could then iterate over them and get the largest number after 
{{orgapachecommons}}?

> [release-plugin] create mojo for release promotion in svn
> ---------------------------------------------------------
>
>                 Key: COMMONSSITE-111
>                 URL: https://issues.apache.org/jira/browse/COMMONSSITE-111
>             Project: Commons All
>          Issue Type: Improvement
>            Reporter: Rob Tompkins
>            Assignee: Rob Tompkins
>            Priority: Major
>
> Currently we have to run a series of svn commands to promote releases. It 
> would be nice if the release plugin did this for us.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to