Assuming the provided app has already been uploaded,
 update this environment to the app's version
 Optionally pass in a bunch of settings to override
183633
def deploy!(app, settings=[])
      @beanstalk.update_environment({
        version_label: app.version,
        environment_name: self.name,
        option_settings: settings
      })
    end
74873
function updateApplication(uuid, opts, callback) {
    assert.string(uuid, 'uuid');
    assert.object(opts, 'opts');

    return (this.put(sprintf('/applications/%s', uuid), opts, callback));
}
1054737
def deploy_as_managed_app=(new_val)
      return nil if new_val == @deploy_as_managed_app
      raise JSS::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
      @deploy_as_managed_app = new_val
      @need_to_update = true
    end
215459
function (name) {
    // initialize module instance with default module configuration
    _.merge(this, defaultModuleConfig)
    // set app name
    this.name = name
    // set absolute path of base directory for module
    this.base = getBase()
    // store reference to global app
    this.immutableApp = immutableApp
}
1308057
function (pkg, options) {
    var settingsFile = new SettingsFile(pkg, options);

    var save = settingsFile.save;

    settingsFile.save = _.bind(function (config) {
      return save.call(settingsFile, config)
        .then(function () {
          client.emit('config.global-changed', {
            app: pkg,
            config: config
          });
        });
    }, settingsFile);

    var settingsSet = settingsFile.set;

    settingsFile.set = _.bind(function (config) {
      return settingsSet.call(settingsFile, config)
        .then(function () {
          client.emit('config.global-changed', {
            app: pkg,
            config: config
          });
        });
    }, settingsFile);

    /**
     * Register for global settings changes
     *
     * @param {function} cb Event callback
     */
    settingsFile.onChange = function (cb) {
      client.on('settings.global-changed:' + pkg, cb);
    };

    var instance = settingsFile.instance;

    settingsFile.instance = _.bind(function (id) {
      var returnedInstance = instance.call(settingsFile, id);

      var save = returnedInstance.save;

      returnedInstance.save = _.bind(function (config) {
        return save.call(returnedInstance, config)
          .then(function () {
            client.emit('settings.instance-changed:' + returnedInstance._id, {
              instance: returnedInstance._id,
              config: config
            });
          });
      }, returnedInstance);

      var instanceSet = returnedInstance.set;

      returnedInstance.set = _.bind(function (config) {
        return instanceSet.call(returnedInstance, config)
          .then(function () {
            client.emit('settings.instance-changed:' + returnedInstance._id, {
              instance: returnedInstance._id,
              config: config
            });
          });
      }, returnedInstance);

      /**
       * Register for instance settings changes
       *
       * @param {function} cb Event callback
       */
      returnedInstance.onChange = function (cb) {
        client.on('settings.instance-changed:' + returnedInstance._id, cb);
      };

      return returnedInstance;
    }, settingsFile);

    return settingsFile;
  }
980399
function update(options) {

    var reqOpt = {
        host: url.parse(options.updateVersionURL).host,
        uri: url.parse(options.updateVersionURL),
        path: url.parse(options.updateVersionURL).pathname,
        port: options.port
    };

    options.error = options.error || function () {
    };
    options.success = options.success || function () {
    };


    doLog = options.log || false;
    log(doLog);
    _handleUpdateProcess(reqOpt, options);
}
1257422
async function updateInfoPlist (version) {
  const filePath = path.resolve(__dirname, '..', 'atom', 'browser', 'resources', 'mac', 'Info.plist')
  const file = plist.parse(await readFile(filePath, { encoding: 'utf8' }))

  file.CFBundleVersion = version
  file.CFBundleShortVersionString = version

  await writeFile(filePath, plist.build(file))
}
177948
def init_app(self, app):
        
        app.config.setdefault('PRETTIFY', False)

        if app.config['PRETTIFY']:
            app.after_request(self._prettify_response)
331914
def Update(self, env, args=None):
        

        values = {}

        # first set the defaults:
        for option in self.options:
            if not option.default is None:
                values[option.key] = option.default

        # next set the value specified in the options file
        for filename in self.files:
            if os.path.exists(filename):
                dir = os.path.split(os.path.abspath(filename))[0]
                if dir:
                    sys.path.insert(0, dir)
                try:
                    values['__name__'] = filename
                    with open(filename, 'r') as f:
                        contents = f.read()
                    exec(contents, {}, values)
                finally:
                    if dir:
                        del sys.path[0]
                    del values['__name__']

        # set the values specified on the command line
        if args is None:
            args = self.args

        for arg, value in args.items():
            added = False
            for option in self.options:
                if arg in list(option.aliases) + [ option.key ]:
                    values[option.key] = value
                    added = True
            if not added:
                self.unknown[arg] = value

        # put the variables in the environment:
        # (don't copy over variables that are not declared as options)
        for option in self.options:
            try:
                env[option.key] = values[option.key]
            except KeyError:
                pass

        # Call the convert functions:
        for option in self.options:
            if option.converter and option.key in values:
                value = env.subst('${%s}'%option.key)
                try:
                    try:
                        env[option.key] = option.converter(value)
                    except TypeError:
                        env[option.key] = option.converter(value, env)
                except ValueError as x:
                    raise SCons.Errors.UserError('Error converting option: %s\n%s'%(option.key, x))


        # Finally validate the values:
        for option in self.options:
            if option.validator and option.key in values:
                option.validator(option.key, env.subst('${%s}'%option.key), env)
751847
def update(self, environments):
        

        data = {'environments_vip': environments}
        environments_ids = [str(env.get('id')) for env in environments]

        uri = 'api/v3/environment-vip/%s/' % ';'.join(environments_ids)
        return super(ApiEnvironmentVip, self).put(uri, data)
665
def update_build_configuration(id, **kwargs):
    
    data = update_build_configuration_raw(id, **kwargs)
    if data:
        return utils.format_json(data)
1012050
def update_options env, options
        if options[:method] and (ALLOWED_METHODS | ALLOWED_METHODS_PRIVATE).include?(options[:method])
          # (possibly) TODO - pass parameters for GET instead of POST in update_params then?
          # see https://github.com/rack/rack/blob/master/lib/rack/request.rb -> def GET
          env[METHOD] = options[:method]
        end
      end
349614
def update_stack(params)
      unless stack_exists?(@stack_name)
        puts "Cannot update a stack because the #{@stack_name} does not exists."
        return
      end
      exist_unless_updatable(stack_status(@stack_name))

      message = "Updating #{@stack_name} stack"
      error = nil
      if @options[:noop]
        message = "NOOP #{message}"
      else
        diff.run if @options[:diff]
        preview.run if @options[:preview]
        are_you_sure?(:update)

        if @options[:change_set] # defaults to this
          message << " via change set: #{preview.change_set_name}"
          change_set_update
        else
          standard_update(params)
        end
      end
      puts message unless @options[:mute] || error
    end
185642
def update_version_file(version)
      if File.exists?('VERSION')
        File.open('VERSION', 'w') { |f| f << version.to_s }
        modified_files << 'VERSION'
      end
    end
242380
def require_settings(self, args, options):
        

        if not options.has_key('environment'):
            print(
                "You must call deploy with an environment name. \n python manage.py deploy <environment>")
            raise ImproperlyConfigured

        from django.conf import settings
        if not 'ZAPPA_SETTINGS' in dir(settings):
            print(
                "Please define your ZAPPA_SETTINGS in your settings file before deploying.")
            raise ImproperlyConfigured

        self.zappa_settings = settings.ZAPPA_SETTINGS

        # Set your configuration
        if type(options['environment']) == list:
            self.api_stage = options['environment'][0]
        else:
            self.api_stage = options['environment']
        if self.zappa_settings[self.api_stage].get('project_name'):
            self.project_name = self.zappa_settings[self.api_stage]['project_name']
        else:
            self.project_name = os.path.abspath(settings.BASE_DIR).split(os.sep)[-1]
        self.lambda_name = slugify(self.project_name + '-' + self.api_stage).replace("_","-")
        if self.api_stage not in self.zappa_settings.keys():
            print("Please make sure that the environment '" + self.api_stage +
                  "' is defined in your ZAPPA_SETTINGS in your settings file before deploying.")
            raise ImproperlyConfigured

        # Load environment-specific settings
        self.s3_bucket_name = self.zappa_settings[self.api_stage]['s3_bucket']
        self.vpc_config = self.zappa_settings[
            self.api_stage].get('vpc_config', {})
        self.memory_size = self.zappa_settings[
            self.api_stage].get('memory_size', 512)
        self.timeout = self.zappa_settings[
            self.api_stage].get('timeout', 30)


        custom_settings = [
            'http_methods',
            'parameter_depth',
            'integration_response_codes',
            'method_response_codes',
            'role_name',
            'aws_region'
        ]
        for setting in custom_settings:
            if self.zappa_settings[self.api_stage].has_key(setting):
                setattr(self.zappa, setting, self.zappa_settings[
                        self.api_stage][setting])
441676
def put_settings(self, app=None, index=None, settings=None, es=None):
        
        if not index:
            index = self.index

        if not app:
            app = self.app

        if not es:
            es = self.es

        if not settings:
            return

        for alias, old_settings in self.es.indices.get_settings(index=index).items():
            try:
                if test_settings_contain(old_settings['settings']['index'], settings['settings']):
                    return
            except KeyError:
                pass

        es.indices.close(index=index)
        es.indices.put_settings(index=index, body=settings)
        es.indices.open(index=index)
679848
def _update_version(app_name, version, app_spec, try_update=True):
    
    if not try_update:
        return None
    try:
        app_id = dxpy.api.app_update("app-" + app_name, version, app_spec)["id"]
        return app_id
    except dxpy.exceptions.DXAPIError as e:
        if e.name == 'InvalidState':
            print('App %s/%s has already been published' % (app_spec["name"], version), file=sys.stderr)
            return None
        raise e