0

I'm considering storing previous release builds of my repos in their 'Downloads' sections (my repos are hosted on BitBucket). For example, I may have Version 1.0, 1.1, 1.2, 1.3, etc. for a repo stored in the 'Downloads' section in the form of a .zip. This wouldn't be the actual code, but the resulting build files.

Would it be possible to then retrieve those versions via C# code? I would like to create a program to packages together the zip files for my various repos into a single .zip file. In order to do that, I would need to be able to retrieve all of the zip files for each repo. Is that possible? If so, how? Also, is it possible to push a file to the 'Downloads' section instead of manually adding it?

Roka545
  • 3,404
  • 20
  • 62
  • 106

1 Answers1

1

Bitbucket is just an online hg or git repo, and hence you can interact with it by using the command line tools with certain arguments; after all, it's what sourcetree/tortoisehg gui tools do!

Regarding getting your files back as a zip, I'm sure I recently had cause to investigate and discover that you can ask bitbucket to package up a certain branch and commit into a zip for you. Have a look in this sO thread: BitBucket - download source as ZIP

To my mind thus you should perhaps commit your binaries to a named branch and just have bitbucket serve it up in the same way one can download he source from bitbucket (usuallyy once logged in)

Caius Jard
  • 72,509
  • 5
  • 49
  • 80
  • I'm planning to have a server build the repos and then have the server push the build to Bitbucket. – Roka545 Jul 31 '17 at 23:13