-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Sync targets #64
Sync targets #64
Conversation
@paradoxuum I've noticed that if you sync an SVG, even though we're converting the data, it's still being saved with the SVG extension, so it can't be opened and probably won't work in Studio either. We need to make sure we use the correct extension when syncing and uploading. This wasn't a problem with the "cloud backend" before because the Roblox asset name doesn't matter, but no matter the target, if you upload i.e. a |
Note-I wouldn't hardcode this just for svgs. I plan to support other audio formats in the future that convert to ogg. |
dc07744
to
3bb28e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Can we get a README update as part of this PR?
- Can I get more information on how the lockfile comes into play with these targets? I know we had some discussion about it, but I'd like it to be documented.
I'm also starting to ponder over whether asset uploading should still be in Perhaps What do you think? |
Yeah I was thinking the same when writing the PR, I think everything uploading/writing related should be in |
You could also split up the backend files per target so that the files don't get too long. |
Yep, should this be formatted similarly to Tarmac's README?
Currently, assets with existing hashes will be skipped with the Since the |
Nah, I just mean add documentation for the target and dry run options and keep our current format. |
After testing, it looks like old files in the debug or studio folders aren't removed. This could build up over time and take up a lot of space. I would say clear the directories, but my only concern is that, in the case of Studio syncing, if you have two projects synced locally to Studio, that'd be an issue. Perhaps we could clear them, but suffix the folder name with the root folder's name. So, |
There could also be a |
I made some changes to the |
Awesome! Could you resolve the merge conflicts @paradoxuum |
After testing again, I've found another issue (Sorry!). This might require more thought to fix. We need to pull animation IDs from the lockfile when syncing to a Studio target, or else, if the user's game is expecting animations, it will break. |
Should be fixed now, the change moves the lockfile check to the backends which removes the hard-coded check for the |
Closes #40
Implements the following sync targets, specified through
asphalt sync --target <target>
:cloud
(default): Upload assets to Robloxstudio
: Sync the assets to Studio's content folder under a folder called.asphalt
debug
: Sync the assets to a folder in the working directory called.asphalt-debug
A
--dry-run
flag has also been implemented for the sync command, which will skip asset syncing and only output what assets will be synced.Code generation functions have been altered slightly to accept a
BTreeMap<String, String>
instead of aLockfile
. This is becauseFileEntry
requires integer asset IDs whereas local syncing generates a string ID that points to a path in the content directory.