             # Always force the new changes
             'git merge develop -X theirs'
             # Apply tag
-            "git tag #{thisManifest.version}"
-            # Sync with Github
+            "git tag #{getVersion()}"
+            ## Sync with Github
             'git push origin develop:develop'
             'git push origin master:master'
             'git push origin --tags'


      commit:
        command: ->
          # Update `component.js`
          grunt.task.run('updateComponent')

          chainCommands [
            # Commit
            'git add component.json'

  # Callback is called if the provided file path points to a file that exists
  whenExists = (path, done) ->
    done(path) if grunt.file.exists(path)

  # Get the most up-to-date version
  getVersion = ->
    grunt.file.readJSON('./component.json').version

  # All the manifest files of this repo and its dependencies
  thisManifest = null
