Latest Beta version update script

Hi everyone,
I am trying to automate the updating process so that rclone is always on the latest Beta version.
Any simple way of doing this?
I thought of writing a script but I couldn’t figure out how to always point to the newest created directory.
Is there a shortcut like beta.rclone.com/latest that would point directly to it?
Like it is for the stable releases: http://downloads.rclone.org/rclone-current-linux-amd64.zip

1 Like

There isn’t at the moment no…

You’d have to list the directory and sort it at the moment.

1 Like

Here’s what I use. It’s quick and dirty and bound to break. But it works for the time being…

VERSION=$(curl http://beta.rclone.org | grep -o '<td><a href=".*\/"' | tail -n1 | cut -c 14-30)
curl -O http://beta.rclone.org/$VERSION/rclone-$VERSION%CE%B2-linux-amd64.zip
1 Like

“bound to break” – unfortunately that statement is now true. $VERSION is now: v1.35/"

Which clearly doesn’t work.

There is an open feature request for this and @ncw has said for the next release this will be possible

Until then, here is my current update script.

Your script will work only when there is max 99 beta versions and since current beta is already 114 the script is not functioning.

eg
curl -s http://beta.rclone.org | grep -P -o 'v\d+\.\d+-\d+-[a-z0-9]{8}' | tail -n1 will return xxx.99

almost posted my own thread about this till i saw this thread…
man a url like this would be sweet! http://downloads.rclone.org/rclone-beta-linux-amd64.zip

Good catch @Ajki. I hadn’t been paying attention and didn’t notice it was not pulling three digit builds. I updated the gist to properly sort. No promises it won’t break again though. :slight_smile:

I have wrote a version for powershell that works with windows.
I will release once i polish. ontop of that there is a bug right now with the amd64 download of the latest beta. It is missnamed within thin .zip
the rclone executable doesnt have .exe on the end. which i could fix but i am sure it was just an oversight and the next ones will be fine.

Ok here is my powershell to download and extract the latest beta to a give location. I added two variables. The first one has to be a path that you have write access to. The second one is a boolean that will only move the exe file if set to true. It should detect 32 bit vs 64 bit and at least verify the path exists. Otherwise i havent done much error catching.


The only problem is currently the win64 builds are miss named within the .zip which i assume will be fixed so i programmed this with that assumption.

Let me know what you think.

EDIT
Quick update.
I actually coded a fix for the broken zip file by just renaming the file and put in the --version output at the end of the script just so you have visual confirmation that it updated.

EDIT2
Made a different script that removes the parsing since NCW added the file called rclone-beta-latest-

Looks like NCW has added a letest beta zip.
http://beta.rclone.org/rclone-beta-latest-windows-amd64.zip
for example

Thanks NCW!

EDIT
Updated my script posted above.

I did indeed! I also put a git-log.txt in the archive which gives some idea what has changed.

2 Likes

Aaaawwesome!!! Thank you so much. This will make it so much easier to auto update my rclone copies :slight_smile: