Comments (19)
I'll look into it!
In the mean time you can also use https://www.minio.io/
Take a look at #118
from rome.
@rob-nash I took a look at Bintray and I have few questions I could not find an answer to.
- Bintray's Authentication requires Username/APIKey. Is there a standard location to store these? like
~/.bintray/credentials
- Bintray's repos are namespaced with
:subject
.
GET https://dl.bintray.com/:subject/:repo/:file_path
GET https://:subject.bintray.com/:repo/:file_path // Enterprise only
I guess this value should be configurable rather than just take the username of the current user?
I don't have access to the enterprise version so I can't implement anything that requires that version.
from rome.
Hi there.
I am new to Bintray myself. I setup an open source account yesterday and uploaded some binaries via their API. Seems pretty good.
Open source accounts are free. I think I need to accept a EULA before I attempt my first download of one of these binaries. I'll get back to you on that.
Facebook v0.3.0 is 18Mb so my Carthage bootstrap is pretty slow! This is a snapshot of an API call I built with postman.
The body contains a zip of all the files built by Carthage.
baseURL = https://api.bintray.com
Authentication is basic. So base64 encode the following.
username:APIKey
example
rob-nash:57fexamplekey
A checksum of the file you're uploaded is probably worth doing. Can achieve like so
openssl dgst -sha256 /full/path/to/file
Maybe just support open source accounts, for now?
from rome.
If I attempt to download one of these binaries myself with
https://dl.bintray.com/rob-nash/BinaryDump/iOS/dequable.zip
I don't need to accept a EULA.
The repo is public so I think someone attempting to download this without a Binary account, might get an error code and must accept a EULA, beforehand.
It might be easier to mention in README
- create a free account
- accept EULA
- use Rome
from rome.
Hi,
The cache structure that Rome uses is not quite what you have there, so I'll explain to understand if this is fine also for Bintray.
.dSYM
, .framework
, .version
, .bsymbolmap
are handled separately. They are zipped separately and stored at separate locations. Locations where artifacts are stored follow some conventions derived from the Cartfile.resolved.
See https://github.com/blender/Rome#cache-structure
For example, dequable would be stored at:
https://dl.bintray.com/rob-nash/Dequable/iOS/Dequable.framework.1.3.0.zip
https://dl.bintray.com/rob-nash/Dequable/iOS/Dequable.framework.dSYM.1.3.0.zip
https://dl.bintray.com/rob-nash/Dequable/Dequable.version.1.3.0.zip
If I break this down in Bintray terms this would be
https://dl.bintray.com/:subject/:repo /:file_path
https://dl.bintray.com/rob-nash/Dequable/iOS/Dequable.framework.1.3.0.zip
I'm trying to understand if this is legal with the API or not.
from rome.
The 'file_path' parameter can specify any path. So for instance, I currently have one file located under /iOS
But I guess there is no harm is building any file structure you want, inside the bintray repo.
Could we not just create one file named Dequable.zip
which contains all 3?
from rome.
The following would work.
https://api.bintray.com/content/rob-nash/BinaryDump/iOS/Dequable.framework.1.3.0.zip
https://api.bintray.com/content/rob-nash/BinaryDump/iOS/Dequable.framework.dSym.1.3.0.zip
https://api.bintray.com/content/rob-nash/BinaryDump/iOS/Dequable.version.1.3.0.zip
from rome.
Cool! I'll play some more around and see that I can do.
The reasons for not having one zip are:
- Have the version file accessible ahead of downloading the binary (the version file is like a manifest)
- Allow upload/download of resources separately
- Don't have to replace the whole zip if one file is missing
from rome.
@rob-nash When you uploaded your binaries, what did you use as version
in the api?
In my idea this would be the version of the library you're trying to upload as stated in the Cartfile.resolved
.
What is the point of version
? I don't see how it's used in the download API.
from rome.
For Uploading
Set a header in your request
X-Bintray-Version
For Downloading
In the above example Dequable
is a package.
Get package will give you the available versions
.
Get Version Files returns the files found for a given version.
You will be able to extract a path from these responses.
from rome.
So what version is at https://dl.bintray.com/rob-nash/BinaryDump/iOS/dequable.zip ? Where is the package information here?
I find this service very confusing in general, or at least confusing to use given how Rome works.
Rome has to go from a Cartfile.resolved
like this
github "Alamofire/Alamofire" "4.7.2"
git "ssh://[email protected]:7999/iossdk/ios-rest.git" "v7.1.0"
binary "https://raw.githubusercontent.com/Building42/Specs/master/Carthage/Answers.json" "1.3.6"
to upload/download locations in Bintray
The upload API is:
PUT /content/:subject/:repo/:package/:version/:file_path
:subject
will be something configurable but :repo
and :package
have to be derivable from the Cartfile.resolved
How would Rome derive :repo
and :package
from the above Cartfile.resolved for all 3 cases?
Note that ios-rest
is not the final name of the framework binary, this is why there is a https://github.com/blender/Rome#repositorymap section
from rome.
You have a lot of work and Bintray looks like quite a bit of effort. Let me see if I can build a small wrapper for Bintray, deployable as a cross-platform executable.
It might take me a while, so you might want to close this ticket for now.
If I am successful, I will re-open this ticket, so you can take a look at my work and assess if it is suitable for Rome.
What you think?
from rome.
Just had a look at the API.
So what version is at https://dl.bintray.com/rob-nash/BinaryDump/iOS/dequable.zip ? Where is the package information here?
My binary profile currently has Dequable 1.3.0
When I attempt to upload 1.2.0 with the same :file_path and the following headers, I receive a 409 conflict error code and a message.
{
"message": "Unable to upload files: An artifact with the path 'iOS/dequable.zip' already exists under another version"
}
Navigating the website, I can see that the file directory responds to version filters. So it's important to realise two things here.
- The metadata must include the version number
- The file path must be unique.
So going forward, a naming convention is required. Such as
/content/rob-nash/BinaryDump/iOS/dequable_1.2.0.zip
/content/rob-nash/BinaryDump/iOS/dequable_1.3.0.zip
:subject will be something configurable but :repo and :package have to be derivable from the Cartfile.resolved. How would Rome derive :repo and :package from the above Cartfile.resolved for all 3 cases?
:subject = rob-dash
Agreed, this must be configurable.
:repo = BinaryDump
One caveat to using this service, is that you need to create and name a repo. There can be many repos. The onus should be on the user, in my opinion, to create one and provide the name to Rome. So, this also has to be configurable.
:package = Dequable
This can be extracted from Cartfile.resolved
. In your above example, it would be Alamofire
.
Note that ios-rest is not the final name of the framework binary, this is why there is a https://github.com/blender/Rome#repositorymap section
So we can supply the following paths
iOS/Dequable.framework.1.3.0.zip
iOS/Dequable.framework.dSym.1.3.0.zip
Dequable.version.1.3.0.zip
Get Version Files will return information about all of these files.
from rome.
Looks like there is already a wrapper 👍
Phew!
https://www.npmjs.com/package/bintray
https://github.com/h2non/node-bintray
from rome.
If I understand correctly your idea is to have 1 :repo
where each dependency in the Cartfile.resolved is a :package
.
So, in practice, given the following Cartfile.resolved
github "Alamofire/Alamofire" "4.7.2"
git "ssh://[email protected]:7999/iossdk/ios-rest.git" "v7.1.0"
binary "https://raw.githubusercontent.com/Building42/Specs/master/Carthage/Answers.json" "1.3.6"
where ios-rest.git resolves to 2 targets Rest.framework
and Helper.framework
It would translate to (omitting bcsymbolmaps):
PUT /content/:subject /:repo /:package /:version/:file_path
PUT /content/rob-nash/BinaryDump/Alamofire/ 4.7.2 /Alamofire/iOS/Alamofire.framework.1.3.0.zip
PUT /content/rob-nash/BinaryDump/Alamofire/ 4.7.2 /Alamofire/iOS/Alamofire.framework.1.3.0.dSYM.zip
PUT /content/rob-nash/BinaryDump/Alamofire/ 4.7.2 /Alamofire/Alamofire.version.1.3.0.zip
PUT /content/:subject /:repo /:package /:version /:file_path
PUT /content/rob-nash/BinaryDump/ios-rest/ 7.1.0 /ios-rest/iOS/Rest.framework.7.1.0.zip
PUT /content/rob-nash/BinaryDump/ios-rest/ 7.1.0 /ios-rest/iOS/Rest.framework.7.1.0.dSYM.zip
PUT /content/rob-nash/BinaryDump/ios-rest/ 7.1.0 /ios-rest/ios-rest.version.1.3.0.zip
PUT /content/rob-nash/BinaryDump/ios-rest/ 7.1.0 /ios-rest/iOS/Helper.framework.7.1.0.zip
PUT /content/rob-nash/BinaryDump/ios-rest/ 7.1.0 /ios-rest/iOS/Helper.framework.7.1.0.dSYM.zip
PUT /content/:subject /:repo /:package /:version /:file_path
PUT /content/rob-nash/BinaryDump/Answers/ 1.3.6 /Answers/iOS/Alamofire.framework.1.3.0.zip
PUT /content/rob-nash/BinaryDump/Answers/ 1.3.6 /Answers/iOS/Alamofire.framework.1.3.0.dSYM.zip
PUT /content/rob-nash/BinaryDump/Answers/ 1.3.6 /Answers/Answers.version.1.3.0.zip
So, puts are solved.
How about Gets?
Should the flow be:
- get package
- get version
- get final URL ?
from rome.
Hi. Sorry for delay.
Yes, I believe it should be as you say. Perform get 1, perform get 2, then build URL.
from rome.
It looks like the API is still released as version 1, even after several years of it being in the public domain.
You may want to use that specific version, to be safe.
https://bintray.com/api/v1
from rome.
@rob-nash Thanks to @BalestraPatrick you can now use whatever backend you want
from rome.
You can try the pre-release at: https://github.com/blender/Rome/releases/tag/v0.22.0.59
from rome.
Related Issues (20)
- Xcode version specific upload/download HOT 4
- Concurrent downloads for remote cache HOT 1
- Nexus as example engine HOT 4
- [Question] Framework produces both static and dynamic output HOT 4
- Losing debug capability when using cached builds downloaded by Rome HOT 2
- Static folder isn't uploaded to remote server on Xcode 12 HOT 4
- Rome won't upload all downstream re-built frameworks HOT 3
- Rome sometimes printing partial output HOT 1
- Rome not failing when engine exit code is not zero HOT 1
- Issues running Rome with --no-skip-current HOT 6
- Needs to be updated to support XCFrameworks. HOT 13
- When using currentMap its not possible to reuse the generated binaries HOT 3
- Rome crashes when downloading dependencies HOT 1
- Skip bcsymbolmaps and dsyms when uploading/downloading a framework HOT 4
- Issues with Rome for xcframeworks HOT 24
- Failed to install latest ROME in MAC HOT 1
- using rome download --concurrently with --use-xcframeworks leads to io error: openBinaryFile: resource busy (file is locked)
- Add Rome arm64 release artifact HOT 3
- Error if carthage cache and rome cache have a file and directory with the same name
- Build failure with ghc 9.6.2
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 rome.