shipit icon indicating copy to clipboard operation
shipit copied to clipboard

Upload files only

Open jonaaix opened this issue 3 years ago • 1 comments

I'm trying to just upload my local release build, but it seems shipit always expects any git repo. How can I disable this?

module.exports = (shipit) => {
   require('shipit-deploy')(shipit);

   shipit.initConfig({
      prod: {
         servers: [
            {
               host: 'shop.com',
               user: 'shop',
            },
         ],
         repositoryUrl: '',
         keepReleases: 10,
         deployTo: '/var/www/frontend',
         rsyncFrom: './dist/frontend',
         copy: false
      },
   });
};

Output:

...
Release path created.
Copy project to remote servers.
"copy" method is deprecated, please use "copyToRemote", "copyFromRemote", "scpCopyToRemote" or "scpCopyFromRemote". It will break in v5.0.0.
Copy "/Users/shop/repositories/frontend/dist/frontend/" to "[email protected]:/var/www/frontend/releases/20220501183534" via rsync
[email protected]'s password:
Finished copy.
Setting current revision and creating revision file.
Running "git rev-parse master" on local.
@ fatal: not a git repository (or any of the parent directories): .git
'deploy:update' errored after 9.19 s
Error: Command failed: git rev-parse master
fatal: not a git repository (or any of the parent directories): .git

    at ChildProcess.exithandler (node:child_process:397:12)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12)

jonaaix avatar May 01 '22 18:05 jonaaix

I was wondering the same thing, it's not possible as far as I can tell. ~~Overwriting the built-in deploy:fetch or deploy:update events does not seem to be supported either.~~ (Nevermind that, you can overwrite them, but that doesn't quite fix the problem either).

Best I've come up with so far is creating a custom deploy task that just copies over the files, but that's obviously not ideal since you lose the releases/rollback system unless you implement those yourself as well.

With the state of the project being what it is though I suspect that waiting for the maintainers to make the repository aspect fully optional is futile.

MatthijsReyers avatar Jul 22 '22 01:07 MatthijsReyers