Over a million developers have joined DZone.

How to update Ghost on Windows Azure

· Cloud Zone

Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database on AWS. Try it now! Brought to you in partnership with MongoDB.

While trying Ghost I found myself in the need of updating the code to keep it up to date with the latest version available on github, and since both getting the updates and the deplyoment to Azure Web Sites is done via git I wrote a small batch file that automates the process.

#! /bin/bash
echo Pulling from Azure
git pull azure master
echo Pulling updates from origin
git pull origin
echo Compiling assets
grunt init
grunt prod
echo Committing to local repository
git commit -a -m "Applying changes from origin"
echo Pushing to Azure
git push azure master

A little explanation of what the script does:

  1. It pulls from Azure in case the site has been edited or updated already
  2. It pulls from the master of Ghost to get the latest changes
  3. Executes the grunt build file: compiles Sass, concat javascript files and finally mininfy them
  4. It commits to the local repository all the changes (including all the generated files)
  5. A finally pushes to git repository used by the Azure Web Site
Tags: ,

Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.


Published at DZone with permission of Simone Chiaretta, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}