Skip to content

1.0.2 does not enact the package-exclude directive #2471

Closed

Description

@chris-hailstorm

Snippet of serverless.yml:

package:
    exclude:
        - notes

Running v1.0.0-rc.2, the "notes" directory was excluded. Now running 1.0.2, it is not excluded. The serverless.yml file has not changed.

Activity

  1. pmuens commented on Oct 19, 2016

    @pmuens
    Contributor
  2. chris-hailstorm commented on Oct 19, 2016

    @chris-hailstorm
    Author

    Tried this:

    
    package:
        exclude:
            - notes/**
    

    and this:

    package:
        exclude:
            - ./notes/**
    

    In both cases, directory notes and its two files are still in the zip file:

          905  10-19-16 19:30   node_modules/wrappy/wrappy.js
           57  10-19-16 19:30   notes/to-deploy.txt
           80  10-19-16 19:30   notes/to-invoke.txt
        80176  10-19-16 19:30   vendored-copy/ipaddress.py
    

    ??

  3. chris-hailstorm commented on Oct 19, 2016

    @chris-hailstorm
    Author

    I like the idea of globs but per my second comment, either they're not working or the syntax is not obvious.

  4. pmuens commented on Oct 20, 2016

    @pmuens
    Contributor

    Hmm. That's strange. Works for me.

    Here's me serverless.yml:

    service: my-test-service
    
    provider:
      name: aws
      runtime: nodejs4.3
    
    functions:
      hello:
        handler: handler.hello
        events:
          - http: GET hello
    
    package:
      exclude:
        - notes/**

    And here's the directory structure:

    bildschirmfoto 2016-10-20 um 07 46 05

    When I run serverless deploy --noDeploy and inspect the zip file I cannot find the notes directory:

    bildschirmfoto 2016-10-20 um 07 48 15

  5. mthenw commented on Nov 3, 2016

    @mthenw
    Contributor

    Closing this one as it's already discussed in #2071.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions