Giter VIP home page Giter VIP logo

electron-simple-publisher's People

Contributors

megahertz avatar rdiazv avatar tillbaks avatar yuanfang-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

electron-simple-publisher's Issues

Support custom transport

Hi, I really love the transport design, I used to write a lot scripts but now just a few config. Thanks for providing such awesome tool.

Many web cloud services besides AWS s3 provide sdk for node.js. And I know it is not possible to cover all transport services.
So I wonder if electron-simple-publisher could support extend custom transport.

For example, I write a new transport JS file same as lib/transport/, then use it in publisher.json.

Furthermore, I could create a custom transport and make it a individual module, then other one just install this module and config it in publisher.json.

Feature request: Create remote path if it doesn't exist

Since we create dozens of apps, it would be great if running the publisher would auto-create the needed directories for the remote FTP location. Right now I get: Can't change directory to /test-app: No such file or directory

Path parameter doesn't seem to work

package.json

{
  "directories": {
    "output": "dist/release"
  }
}
$ ./node_modules/.bin/publish 
ENOENT: no such file or directory, scandir '[OMISSIS]/dist/mac'

$ ./node_modules/.bin/publish -p dist/release/
ENOENT: no such file or directory, scandir '[OMISSIS]/dist/mac'

I expected it to scan the directory "dist/release/mac".

crashing on publish

please see this

`> publish

Could not initialize a transport. Check transport.module option.

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "publish"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] publish: publish
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] publish script 'publish'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the filmplicity package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! publish
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs filmplicity
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls filmplicity
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Scratch\Filmplicity\npm-debug.log

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "release"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] release: npm run dist && npm run publish
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] release script 'npm run dist && npm run publish'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the filmplicity package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run dist && npm run publish
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs filmplicity
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls filmplicity
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Scratch\Filmplicity\npm-debug.log`

for some reason it builds it, but then crashes when it tries to publish it please help

folders

Hi the new paths were updated from squirrel please updated them for me.

image

update.json

got it to work.. but how does it auto iinstall once its done without the user clicking anything?

Error : Cannot read property 'endsWith' of undefined

When sending the files Via Amazon S3, when the last file is sent, the following error is generated:

Cannot read property 'endsWith' of undefined

I am using the following command:
node_modules/.bin/publish --path ./artifacts/installers/packaged/

(SOLVED) Failed at the [email protected] install script.

One of the electron-simple-publisher dependencies has a missing dependency on ESP install process.

PhantomJS installation fails when throws this error:
Error: Cannot find module 'is-my-json-valid'

The solution is to install the module before trying to install electron-simple-builder
npm install --save-dev is-my-json-valid

update.json not created with github

Hello,

First of all; maybe i'm doing something wrong.

But when i run node_modules/.bin/publish or node_modules/.bin/publish publish linux.
The update.json is not created. It's creating a dir named uploads and uploads and it creates for example "darwin-x64-prod.json". My app is now for linux only, it is an appImage.

I tried in package.json the following:
"updater": {
"url": "updates/update.json"
},

and in publisher.json
"metaFileUrl": "updates/update.json",

And i also tried all kinds of variations for example
-> https://raw.githubusercontent.com/usernane/reponame/master/update.json
-> updates/update.json
-> /updates/update.json

But it never created the update.json file. Only the build files in /updates.

Thanks for the help

32bit

hi, so i have been reading up on some of the things that were being used and i see you said to a previous message about using

build --ia32 but it doesn't work :|

also you are using target = squirrel.windows they say its depreciated..

so if i use nsis can i still use your auto updating?

Building for 32 Bit version

Hi,

Simple publisher works without any problems with
"win": { "target": "squirrel" }
for windows 64Bit. How can I build with squirrel for 32 Bit versions of windows.

Thank you

Permission denied when using SSH as transport to publish updates

I was using the configuration in example folder (changed the credentials to use my server) to test SSH uploading. I found that when using npm run release, there is always an error says 'Permission denied'. After a bit of investigation, I found the reason is that it always publishes assets in a new folder, which doesn't exist on the remote server. Am I missing something or should there be a mkdir if the path doesn't exist?

Grouping multi-platform builds into single release on Github Releases?

Hi, thanks for your work on this lib--it works great and has saved a huge amount of time!

I noticed then when I do a cross-platform publish, like publish darwin win32 linux using the Github transport, that three separate releases are created. Is there any way to accomplish (or plans to support) the ability to group all platform archives into a single release per version? This seems to be a bit more standard in terms of how most OSS projects are dealing with releases on Github.

Transport module FTP: looks up updates.json on port 80

Hi. There's a problem. Electron simple publisher tries to get updates.json on port 80 even though I use FTP and have specified another port. Here's my publisher.json:

{
  "transport": {
    "module": "ftp",
    "host": "localhost",
    "port": 21,
    "user": "user",
    "password": "password",
    "remotePath": "/publish",
    "remoteUrl": "ftp://localhost/publish"
  }
}

package.json:

"updater": {
  "url": "ftp://localhost/updates.json"
}

When I fire up ./node_modules/.bin/publish I get the following error after the successful upload of setup files:

connect ECONNREFUSED 127.0.0.1:80

I tried to read provided logs but there was no useful information there. Is this a bug or expected behavior?

add-assets-info.js update for OS X

Changed:

  'darwin-x64': {
    dir: '',
    assets: {
      update: 'mac/{version}-mac.zip',
      install: '{version}.dmg',
      metaFile: null
    }
  },

to

  'darwin-x64': {
    dir: 'mac',
    assets: {
      update: '{version}-mac.zip',
      install: '{version}.dmg',
      metaFile: null
    }
  },

SSH transport fails when using 'password'

Great work for simplifying auto updates, thank you so much.
electron-builder and the others are so poorly documented and complex.

Had to change transports/ssh.js.
Faulty boolean logic for private key checks when 'password' is specified in publisher.json/options

if (options.usePrivateKey || !options.privateKeyPath || !options.privateKey) {
      // options.privateKeyPath = path.join(os.homedir(), '.ssh', 'id_rsa');
    }
    if (options.privateKeyPath) {
      // options.privateKey = fs.readFileSync(options.privateKeyPath, 'utf-8');
    }

File path error due to change in electron-builder

electron-builder now puts the .dmg image outside of the mac/ folder, so electron-publisher can't find it. The quick fix for this is just manually moving the .dmg file into the mac/ folder and then running "npm run publisher".

wrong file name

Hello,

I've got problem with file's name.

ESP is wainting for name-0.0.7-mac.zip but i've got name-0.0.7.zip

Is there a param to change it ?

Thks

Armv7l + mwl

Hi Megahertz,

Many thanks for yours "simple" publisher and updater ๐Ÿฅ‡


I test and dont want make a pr for so small : electron-simple-publisher/lib/utils/add-assets-info.js

'linux-armv7l': {
  install: '{name}-{version}-armv7l.AppImage',
  metaFile: null,
  update: '{name}-{version}-armv7l.AppImage'
}

worked for me.


My question regarding mwl according to electron.build -mwl, cause i want to publish all artifacts in one line expect with something ugly like that :
"publish": "publish darwin-x64 win32 linux-armv7l",
Have you plan something on that ?


Thanks

Option to use S3 credentials from home directory

In order to remove the need to enter the accessKeyId and secretAccessKey in the configuration file. Allow users to grab access key from their ~/.aws/credentials if configured. I believe this is the default behavior of AWS.S3 module if the keys are not found (at least on macOS). I have an inbound PR that is working for me on macOS.

Error "Unknown build type publisher.js-x64"

I get this error,

{ command: 'publish',
  builds: [ 'publisher.js' ],
  fields: {},
  transport: {} }
Unknown build type publisher.js-x64

After reading the source code and placing cosole.log, The error occurs here:

function addAssetsInfo(build, options) {
  const name = `${build.platform}-${build.arch}`;
  const meta = ASSETS_DATA[name];
  if (!meta) {
    throw new Error(`Unknown build type ${name}`);
  }

And I traced the build.platform containing the name of the config file to this location:

options.builds = args.filter(a => Boolean(a));

Where a is the list of command line arguments.

transport.updatesJsonUrl Not Work

image

C:\Users\Maicon\Documents\Sistemas\MedicSolution>publish win32-x64-prod-v0.0.3
File with mask 0.0.3-full.nupkg is not found at C:\Users\Maicon\Documents\Sistemas\MedicSolution\dist\win
File with mask 0.0.3.exe is not found at C:\Users\Maicon\Documents\Sistemas\MedicSolution\dist\win
You should set either a package.json:updater.url option or transport.updatesJsonUrl option to publish to github

S3forceStylePath + hardcoded url in updates.json

Hello,

I recently configured this package to automatically upload my electron packages to a minio server. In order to achieve this, I use the S3 transport library.

Here is my configuration:

publisher.json

{
    "transport": {
        "module": "s3",
        "accessKeyId": "myaccessKey",
        "secretAccessKey": "mysecretkey",
        "bucket": "bucket-name",
        "aws": {
            "endpoint": "https://minio.endpoint.com",
            "region": "eu-central-1",
            "s3ForcePathStyle": true,
            "signatureVersion": "v3",
            "gzip": true,
            "s3BucketEndpoint": true
        }
    }
}

To work with minio, I add to set s3ForcePathStyle to true. This parameter generate url like this : https://minio.endpoint.com/bucket-name

The uploading file are stored in the right places ๐Ÿ‘

But, when I open my updates.json file, I can see that the generate url are not right.

Expected URL Output

https://minio.endpoint.com/bucket-name/path/to/release

Actual output

https://bucket-name.s3.amazonaws.com/path/to/release

Solution

In the s3.js file, the return url is hardcoded, maybe we can use parameters to build the url, and retrun it.

I'll make a PR to improve that behaviour, feel free to tell me if I misunderstood somthing, or if my PR is not good enough.

Cheers.

Need some information

Hi before installing it and making test i would like to know if

  • File Macro are supported ? Doc
  • environment variable from electron-builder are available like ${env.ENV_NAME} we can add to electron-builder.env ?

Thanks

Does this support NSIS?

The electron-builder Wiki says that Squirrel.Windows is deprecated and to use NSIS, but it seems to produce different paths / naming conventions than this module looks for. Is is possible to support NSIS releases / updates?

Local publisher

Would be possible to add a parameter to create "updates.json" locally without the need to publish it somewhere else?

File with mask 0.0.0-full.nupkg is not found

When performing a publication without parameters it generates this message, and only updates updates.json

C:\Users\Maicon\Documents\Sistemas\MedicSolution>npm run el:publish

[email protected] el:publish C:\Users\Maicon\Documents\Sistemas\MedicSolution
publish

File with mask 0.0.0-full.nupkg is not found at C:\Users\Maicon\Documents\Sistemas\MedicSolution\dist\win
File with mask 0.0.0.exe is not found at C:\Users\Maicon\Documents\Sistemas\MedicSolution\dist\win
All releases have been successfully published

UPDATE.JSON

hey bud small bug i found. when i release 64 bit it will update the

{
"win32-x64-prod": {
"update": "https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-x64-prod-v0.0.25",
"install": "https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-x64-prod-v0.0.25/Filmplicity.Setup.0.0.25.exe",
"version": "0.0.25"
},
then i run the release32 bit and it changes the 64 bit number to 24
and sets 32 to this

"win32-ia32-prod": {
"update": "https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-ia32-prod-v0.0.25",
"install": "https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-ia32-prod-v0.0.25/Filmplicity.Setup.0.0.25.exe",
"version": "0.0.25"
}

its weird so i have to manually edit the numbers again

Publishing from different OS

Hello @megahertz,
first of all - great repo!
I am using CI servers to build and publish distributable electron packages to s3 from different operating systems (win, osx, linux). This process makes 3 different updates.json being uploaded to s3, which with current version of electron-simple-publisher will only keep the last uploaded one having overwritten previous ones, which in turn makes updates possible only for one OS. My current workaround for overriding is as follow:

  • build with electron-builder,
  • use electron-simple-publisher to publish locally,
  • rename updates.json to updates-${os_name}.json,
  • publish dist/publish directory to s3 manually,
  • init electron-simple-updater with path to updates-${os_name}.json.

It works, but it makes the process longer by copying files locally and more error-prone by requiring me to rewrite publishing to s3.
Would it be possible for electron-simple-publisher to support such a case?

Option --path not work

I'm passing the --path argument to change the path where it should capture the dist files, but it does not take that new path.

C:\Users\Maicon\Documents\Sistemas\MedicSolution>publish --path ./artifacts/installers/packaged/win
ENOENT: no such file or directory, scandir 'C:\Users\Maicon\Documents\Sistemas\MedicSolution\dist\win'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.