MarkMozza Posted April 1, 2020 Share Posted April 1, 2020 (edited) Sorry if this has already been brought up, it should have. Is it already possible to use a git url ( example://github.com/???????/????????/archive/master.zip) but on extract it will include "-master" in the folder path. Would be cool if it was just a feature + its ez to update mods via git. I could literally store all my mods then on git so when i update git, its just a matter of pulling on tcadmin (id have a deploy script anyway automating the whole process) , which also could be a script. Mark Edited April 1, 2020 by MarkMozza Link to comment Share on other sites More sharing options...
Dennis Posted April 1, 2020 Share Posted April 1, 2020 Yes, you can just define it like this in the File URL: https://github.com/example/repo/archive/master.zip filename.zip The last part will define what the file is going to be called after downloaded. However, when extracting this archive, you will just get a folder that's called "reponame-master". You'd need to create a custom script to move files out from this folder. If you open the archive on your own PC, you will also see the same folder. It's not something TCAdmin creates. Link to comment Share on other sites More sharing options...
MarkMozza Posted April 1, 2020 Author Share Posted April 1, 2020 Yes i understand, this is fine for now i guess, but still would be 100x better if you could just provide the .git file and the system will clone it and update with a single button. Your expecting customers to be all experienced with code. Mark Link to comment Share on other sites More sharing options...
Dennis Posted April 1, 2020 Share Posted April 1, 2020 That's just how it works. There's no way to have a "fit all" solution for this. When you download an archive from Github, it will always extract into "reponame-master". That's not something TCAdmin does. When you download from other places, it might be a second or third way - there's now way to make a function that will suit everything. If you give a bit more info about what you need to download (and for what) and where it needs to go, I'll see if I can make a script for you Link to comment Share on other sites More sharing options...
MarkMozza Posted April 1, 2020 Author Share Posted April 1, 2020 Yeah i completely understand, makes perfect sense. I guess because of the update period of most mods is daily, i wanted an easy way to link directly to the git, so each time the mod is installed its up to date. If you could write something very basic that can do it, i should be able to figure out the rest, i am a developer myself but never done this kind of scripting, feel like a bit of a novice here. I was thinking about writing a PHP download script that will clone and rezip and push the new zip to download. Mark Link to comment Share on other sites More sharing options...
Dennis Posted April 1, 2020 Share Posted April 1, 2020 I'd need a bit more info than that. If you paste the link to the Github repo here and tell me where it needs to be extracted, I can have a go with creating a script and testing it Link to comment Share on other sites More sharing options...
mouseymars Posted April 1, 2020 Share Posted April 1, 2020 (edited) This is easy to script. Put the master zip in the url, e.g. https://gitlab.com/KhaineGB/darknessfallsa18server/-/archive/master/darknessfallsa18server-master.zip That downloads it and extracts it to darknessfallsa18server-master Add a move files script that runs after extracting mod files: @echo off cd "darknessfallsa18server-master" xcopy /y /s ".\*" "..\" cd ..\ RD /S /Q "darknessfallsa18server-master" Then it's done. I don't normally share code, but this thread has been the most unhelpful thing ive ever seen. Edited April 1, 2020 by mouseymars 3 Link to comment Share on other sites More sharing options...
Adam Posted September 26, 2020 Share Posted September 26, 2020 This has been added Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now