dsheiko / nw-autoupdater

⛔️ [DEPRECATED] Library provides low-level API to control NW.js app auto-updates
MIT License
75 stars 36 forks source link

Dont't understand how to write VERBOSE . #12

Closed tangyue0924 closed 7 years ago

tangyue0924 commented 7 years ago

Thanks for reading! const updater = new AutoUpdater( require( "../package.json" ), {strategy: 'ScriptSwap', verbose: true}); Is that right? If right, where to write the following script?How to declare variable of this script?

I just want to replace the index.html and static folder.

THX again!

tangyue0924 commented 7 years ago

@dsheiko

dsheiko commented 7 years ago

Heyy @tangyue0924 options.verbose is meant for detailed logs.

By default nw.App.dataPath + "/nw-autoupdater.log": Windows: %LOCALAPPDATA%/; Linux: ~/.config/; OSX: ~/Library/Application Support/

You most likely mean options.swapScript:

 const updater = new AutoUpdater( require( "./package.json" ), {
          strategy: "ScriptSwap",
          swapScript: `
rsync -a\${VERBOSE} --delete \${APP_PATH}/. \${BAK_PATH}/
rsync -a\${VERBOSE} \${UPDATE_PATH}/. \${APP_PATH}/static
`
      });
tangyue0924 commented 7 years ago

@dsheiko Thanks, big bro! Your projects help me so much!

dsheiko commented 7 years ago

So I close it for now. If any questions you can either reopen the issue or reach me via https://gitter.im/dsheiko/nw-autoupdater