         json: true
         body:
           tag: tag
+          rename: options.rename
         headers:
           authorization: token
       request.post requestSettings, (error, response, body={}) ->

  # tag - The string Git tag of the new version.
  # callback - The callback function to invoke with an error as the first
  #            argument.
  createPackageVersion: (packageName, tag, callback) ->
    Login.getTokenOrLogin (error, token) ->
      if error?
        callback(error)

  # tag - The Git tag string of the package version to publish.
  # callback - The callback function to invoke when done with an error as the
  #            first argument.
  publishPackage: (pack, tag, remaining...) ->
    options = remaining.shift() if remaining.length >= 2
    callback = remaining.shift()

    process.stdout.write "Publishing #{options.rename || pack.name}@#{tag} "
    @createPackageVersion pack.name, tag, options, (error) =>
      if error?
        @logFailure()
        callback(error)
