Coder Social home page Coder Social logo

Registering multiple tasks about grunt-scp HOT 8 CLOSED

spmjs avatar spmjs commented on August 29, 2024
Registering multiple tasks

from grunt-scp.

Comments (8)

lepture avatar lepture commented on August 29, 2024

what is your_target under dev? I think the Gruntfile is not valid.

from grunt-scp.

augier avatar augier commented on August 29, 2024

Thanks Lepture. My mistake!

from grunt-scp.

misshula avatar misshula commented on August 29, 2024

having the same issue - @augier , what was the fix ? I'm using the same structure as you mentioned above.

from grunt-scp.

augier avatar augier commented on August 29, 2024

Hi misshula, I was having trouble remembering this for a while but I've dug it out...
I deploy to 2 different servers (dev and uat) by using the setup below.

scp : {
      dev: {
        options : {
          host : '<%= secrets.dev_ip %>',
          username : '<%= secrets.dev_username %>',
          password : '<%= secrets.dev_password %>'
        },
        files: [{
            cwd: '<% yeoman.exports %>',
            src: 'exports/my.war',
            //filter: 'isFile',
            // path on the server
            dest: '/path/to/destination/'
        }]
      },
      uat: {
        options : {
          host : '<%= secrets.uat_ip %>',
          username : '<%= secrets.uat_username %>',
          password : '<%= secrets.uat_password %>'
        },
        files: [{
            cwd: '<% yeoman.exports %>',
            src: 'exports/my.war',
            //filter: 'isFile',
            // path on the server
            dest: '/path/to/other/destination'
        }]
      }      
    }

Let me know if anything is unclear!

from grunt-scp.

misshula avatar misshula commented on August 29, 2024

Ah hA! i had the extra target : {} under my dev..

thanks so much @augier for the help!!

from grunt-scp.

augier avatar augier commented on August 29, 2024

No problem, so obvious when you know how!

from grunt-scp.

breaklee avatar breaklee commented on August 29, 2024

it's doesn't work.

config.scp = {
     "dev" : { "options" : {
                "host" : "aa",
                "username" : "set",
                "password" : "set"
            },
            "upload" : {
                "files" : [{
                    "cwd" : "./",
                    "src" : "set.zip",
                    "filter" : "isFile",
                    "dest" : "./"
                }]
            },
  "live" : {}
}

grunt scp:dev:upload;

from grunt-scp.

misshula avatar misshula commented on August 29, 2024

double check your object structure @breaklee

you have an extra 'upload' there

from grunt-scp.

Related Issues (20)

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.