larsenwork / monoid

Customisable coding font with alternates, ligatures and contextual positioning. Crazy crisp at 12px/9pt. http://larsenwork.com/monoid/
7.86k stars 170 forks source link

Adding version number to zip file to update rawgit #64

Closed larsenwork closed 9 years ago

larsenwork commented 9 years ago

So it's e.g. Monoid-0-1-3-NoCalt-v0.50.zip instead of Monoid-0-1-3-NoCalt.zip otherwise rawgit isn't updated :scream: :smile:

chase commented 9 years ago

Huh, that's strange that RawGit doesn't propagate correctly.

larsenwork commented 9 years ago

I think it's by design if you read the description on their website. I just hardcoded v.0.52 now - not too much trouble actually so not sure if we should do anything more about it. Version-number just needs to be updated

  1. In fonts
  2. In zip script
  3. On the webpage
chase commented 9 years ago

Ah, you're right: "Permanently caches after first request."

I have a better idea than using a version number, I can just add a file version.js to gh-pages containing that sets window.MONOID_RELEASE to the release commit hash in the gh-pages step.

That way you don't have to manually set a new version every damn time.

So basically the URL would become:

'https://cdn.rawgit.com/larsenwork/monoid/' + window.MONOID_RELEASE + '/Monoid' + options + '.zip'

Instead of :

'https://cdn.rawgit.com/larsenwork/monoid/release/Monoid' + options + '.zip'
chase commented 9 years ago

RawGit even says:

It's best to use a specific tag or commit hash in the URL (not a branch). Files are cached permanently after the first request.

Silly that I didn't pay attention to this earlier.

larsenwork commented 9 years ago

No worries, it works now :smile:

version.js could be great to have

chase commented 9 years ago

@larsenwork Something you are doing with Cloudflare and GitHub pages is causing larsenwork.com/monoid/js/release.js to get a 404. Any ideas?

larsenwork commented 9 years ago

no, but clearing the cache is my go to thing when having issues...two sec

larsenwork commented 9 years ago

did it help?

larsenwork commented 9 years ago

I can put the caching in dev mode if you're trying things out?

chase commented 9 years ago

Hm, since release needs to not be cached how about you set up a CloudFlare page rule for /monoid/js/release.js with Custom caching set to Bypass cache?

chase commented 9 years ago

I'm not trying things out. The fix went live, but CloudFlare wasn't picking up until you manually purged the cache. I made an emergency patch to use the RawGit testing URL, but that's a no-go in the long term.

larsenwork commented 9 years ago

like this? screen shot 2015-07-24 at 22 52 01

chase commented 9 years ago

That should do it. Going to do a rebuild and see if the release is updated correctly.

larsenwork commented 9 years ago

Hehe...I'm not feeling overly audacious right now either - but things look like they're working and we are :rocket: to the :star2: so we must be doing something right. c7c