mottosso / be

minimal directory and environment management system for collaborative creative projects
GNU Lesser General Public License v2.1
47 stars 4 forks source link

be update #37

Open mottosso opened 9 years ago

mottosso commented 9 years ago

goal

To synchronise a running project with it's source configuration. Suggested by @hommes-doutant here.

implementation

Updating an existing project could look like this.

$ be update spiderman

Following which be.yaml, templates.yaml and inventory.yaml is updated.

The name of the given project must be given, similar to how it would normally be given during be in or be ls etc.

Only projects started from a preset would support being updated. When starting a project via be new, a reference to it's source is embedded in be.yaml.

be.yaml

source: mottosso/be-film

If the source is local, then it's local name is provided.

source: mylocalpreset

The source is then used to determine from where to pull updates.

overlap

In the case of updating a configuration file with modified values, what should happen?

original

environment:
  MYVAR: My value

old

environment:
  MYVAR: My value
  MYADDEDVAR: Another value

new

environment:
  MYVAR: New value

result

environment:
  MYVAR: New value
  MYADDEDVAR: Another value

A simple {}.update({}) would suffice here, but what about when modifications involve removal of data?

original

environment:
  MYVAR: My value
  MYOTHERVAR: Another value

new

environment:
  MYVAR: My value

Or modifications to an original value?

original

environment:
  MYVAR: My short value

new

environment:
  MYVAR: My longer value

problem

A number of questions arise that might make the experience not-so-intuitive and unsafe.