Sublime Forum

Fixed download url for latest version

#1

As already mentioned here in the other topic updating sublime under ubuntu is not as convenient as possible.

I just want to politely ask whether it is possible to provide the latest tarball versions for linux with a fixed path such as

https://download.sublimetext.com/sublime_text_3_build_LATEST-STABLE_x64.tar.bz2

to at least use a bash script which runs the entire update procedure.

BUILD=3126 # I want "latest" here
URL=https://download.sublimetext.com/sublime_text_3_build_${BUILD}_x64.tar.bz2
wget $URL
tar -xvf sublime_text_3_build_${BUILD}_x64.tar.bz2 sublime_text_3
cp sublime_text_3/sublime_text.desktop ~/.local/share/applications/sublime_text.desktop
1 Like

Direct download link
#2

There is a resource for update checking which has the latest build number inside. I don’t know the URL by heart though and would need to look it up when I’m at a pc again. I also don’t know how “official” this is, that is how long it will be provided.

Feel free to remind me tomorrow if I forget about it.

2 Likes

#3

A non-official.

 wget -qO - http://www.sublimetext.com/3 | grep -Po -m1 "\\b([0-9]+)(?=\.dmg)"

Output

3126
2 Likes

#4

You do not want to download the entire html page. Following the idea of FichteFoll, I found

http://www.sublimetext.com/updates/3/stable/updatecheck?platform=linux&arch=x64

Given the output

{
    "latest_version": 3126,
    "update_url": "https://www.sublimetext.com/3",

    "manifest_host": "www.sublimetext.com",
    "update_host": "download.sublimetext.com",

    "manifest_path_osx": "/_pak/sublime_text_osx_3126.manifest.xz",
    "update_path_osx": "/sublime_text_osx_3126.pak.xz",

    "manifest_path_windows_x64": "/_pak/sublime_text_windows_x64_3126.manifest.xz",
    "update_path_windows_x64": "/sublime_text_windows_x64_3126.pak.xz",

    "manifest_path_windows_x32": "/_pak/sublime_text_windows_x32_3126.manifest.xz",
    "update_path_windows_x32": "/sublime_text_windows_x32_3126.pak.xz"
}

I ended up with:

BUILD=`curl -s http://www.sublimetext.com/updates/3/stable/updatecheck?platform=linux | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["latest_version"]'`
echo ${BUILD}
URL=https://download.sublimetext.com/sublime_text_3_build_${BUILD}_x64.tar.bz2
wget $URL
tar -xvf sublime_text_3_build_${BUILD}_x64.tar.bz2 sublime_text_3
cp sublime_text_3/sublime_text.desktop ~/.local/share/applications/sublime_text.desktop

Hoping the download paths will remain the same. However, this should not be the way to update this application under Linux.

To get this url I captured the request during the start of sublime_text

tcpdump -i any -w /tmp/sublime.log -s 1500 -A host 209.20.75.76 and tcp port http
tcpdump -A -r /tmp/sublime.log | less
5 Likes

Automatically update Sublime Text 3 on Linux
Auto link to latest build?
#5

just did not know that api

0 Likes

#6

see also https://github.com/randy3k/sublime_text_installer/commit/063e8cb7de84e46667836e57f9b1d3ac16ceaecb (which just scrapes the ST downloads webpage)

0 Likes

#7

The build number of the latest builds can be grabbed from:

Currently the following URLs will redirect to the latest builds:

We are refraining from documenting 32 bit linux URLs since they may go away in the future, due to a general lack of 32 bit linux installs.

5 Likes

#8

Can we get documented list of similar URL’s to determine/retrieve the latest version of Sublime Merge as well to go with the ones above for Text? Of primary interest (to me at least) is the ability to determine the latest release number in either channel, since the Linux tarball builds don’t look for updates explicitly the way that Text does.

0 Likes

#9

Here are the Sublime Merge URLs:

1 Like

#10

FYI, this URL doesn’t work as it appends .dmg instead of the current .zip format. (stable URL works fine)

This one is also incorrect & points to sublime-text_build-1104_amd64.deb for some reason.

0 Likes

#11

Thank you very much for the bug reports!

0 Likes

#12

The two erroneous download URLs for Merge have been fixed.

1 Like

#13

I apologize for waking up an old thread like this, but this seems like the most appropriate place.

I tried using some of these URLs today, and I noticed that the following no longer appears to be working (they redirect to a File Not Found page).

https://download.sublimetext.com/latest/dev/linux/x64/bz2
https://download.sublimetext.com/latest/dev/osx
https://download.sublimetext.com/latest/dev/windows/x32/exe
https://download.sublimetext.com/latest/dev/windows/x32/zip
https://download.sublimetext.com/latest/dev/windows/x64/exe
https://download.sublimetext.com/latest/dev/windows/x64/zip
https://download.sublimetext.com/latest/stable/linux/x64/bz2
https://download.sublimetext.com/latest/stable/osx
https://download.sublimetext.com/latest/stable/windows/x32/exe
https://download.sublimetext.com/latest/stable/windows/x32/zip
https://download.sublimetext.com/latest/stable/windows/x64/exe
https://download.sublimetext.com/latest/stable/windows/x64/zip

The following URLs still work fine.

https://download.sublimetext.com/latest/dev
https://download.sublimetext.com/latest/dev/linux/x64/deb
https://download.sublimetext.com/latest/dev/linux/x64/pkg
https://download.sublimetext.com/latest/dev/linux/x64/rpm
https://download.sublimetext.com/latest/stable
https://download.sublimetext.com/latest/stable/linux/x64/deb
https://download.sublimetext.com/latest/stable/linux/x64/pkg
https://download.sublimetext.com/latest/stable/linux/x64/rpm

All of the Sublime Merge URLs appear to be working just fine.

0 Likes