Skip to content

Enhance usync.once/stop to support write only deployment #878

@tbolon

Description

@tbolon

Hi,

We are using "write only" deploment (webdeploy without the option remove remote files first), and I can't find a way to use the usync.once / stop file.

My uSync configuration:

  "uSync": {
    "Settings": {
      "ExportOnSave": "None"
      "ImportAtStartup": "Settings",
      "StopFile": "../usync.stop",
      "OnceFile": "../usync.once"
    }
  },
  1. I deploy the site first with a usync.once file
  2. usync run the migration, and rename the file as "usync.stop"
  3. I deploy the site a second time with a new usync.once file
  4. usync ignore the file because there is a usync.stop file present

How could I handle this kind of deployment? I am sure I am not alone deploying using a write-only process.

I have a few suggestion to handle this case, when "ImportAtStartup" is set:

  1. If a ".once" file is present, execute the import unconditionally, then rename or delete the .once file.
  2. If a ".stop" file is present, skip the import
  3. Else execute the import

This could be a breaking change if people have a deployment with the two files present (but it will only execute once).

The other option is to handle a new extension (which will cause the import to ignore the .stop for this extension only), or a new setting link "OnceHavePriority": true to enable the suggested behavior.

Thanks,

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions