Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't generate tags for non-standard layout #122

Closed
capslocky opened this issue Apr 6, 2021 · 1 comment
Closed

Can't generate tags for non-standard layout #122

capslocky opened this issue Apr 6, 2021 · 1 comment

Comments

@capslocky
Copy link

We have a non-standard layout with many projects within same svn repo

/branches/2020.01/project-alpha
/branches/2020.01/project-beta
/branches/2020.01/project-gamma

Let's take first one, its consequent development would be

/branches/2020.02/project-alpha
/branches/2020.03/project-alpha
/branches/2020.04/project-alpha
...

And appropriate release tags (svn copies) are

/releases/2020.01.001/project-alpha
/releases/2020.01.002/project-alpha
/releases/2020.01.003/project-alpha
/releases/2020.01.004/project-alpha
...
/releases/2020.02.001/project-alpha
/releases/2020.02.002/project-alpha
/releases/2020.02.003/project-alpha

I have tried different rules to get these tags, but didn't succeed yet. My last attempt looks like

match /releases/$
  action recurse
end match

match /releases/(.+)/project-alpha/
  repository alpha
  branch refs/tags/v\1
  annotated true
end match

match /branches/(.+)/project-alpha
  repository alpha
  branch master
end match

These tag copy actions also seen by tool in logs:

Exporting revision 56445     /releases/2020.03.008 was copied from /branches/2020.03 rev 56444
 done

Exporting revision 56449     /releases/2020.03.009 was copied from /branches/2020.03 rev 56448
 done

I have read docs, went through examples and checked #83, but I am still stuck.
Could you please suggest how to approach those tags?

@capslocky
Copy link
Author

I was able to generate the tags, closing the ticket. There are two things:

  • added separate recurse action for every sub-folder (my example was simplified too much).
  • used more precise regex.
match /releases/([\d\.]+)/$
  action recurse
end match

match /releases/([\d\.]+)/some-folder/$
  action recurse
end match

match /releases/([\d\.]+)/some-folder/project-alpha/
  repository alpha
  branch refs/tags/v\1
  annotated true
end match

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant