Closed kaihendry closed 7 years ago
cc @jalateras
oops, somehow I swapped blacklist and whitelist, fixed the readme, but yeah it is forcing ./server now by default, so *
would be ok there alone.
did you try:
!templates
or
!templates/**
both of those should work I believe
~/go/src/github.com/apex/up-examples/oss/golang-gin$ cat .upignore
*
!templates
!templates/**
!cmd/api/templates/
!server
~/go/src/github.com/apex/up-examples/oss/golang-gin$ ll cmd/api/templates/
total 12K
drwxrwxr-x 2 hendry users 4.0K Sep 11 11:24 .
drwxrwxr-x 3 hendry users 4.0K Sep 11 11:22 ..
-rw-rw-r-- 1 hendry users 121 Sep 11 11:24 headers.tmpl
~/go/src/github.com/apex/up-examples/oss/golang-gin$ up build -v
4ms DEBU 1 regions from config
0s DEBU track "Build" map[os:linux arch:amd64 version:0.2.3]
0s DEBU event platform.build map[]
0s DEBU event hook map[name:build]
770ms DEBU hook "build" command "GOOS=linux GOARCH=amd64 go build -o server cmd/api/main.go"
0s DEBU event hook.complete map[name:build duration:770.515627ms]
127ms DEBU injecting proxy
0s DEBU open
0s DEBU filtered .gitignore – 14
0s DEBU filtered .upignore – 55
0s DEBU filtered Gopkg.lock – 1471
0s DEBU filtered Gopkg.toml – 535
0s DEBU filtered Readme.md – 525
0s DEBU add _proxy.js: size=931 mode=-rwxr-xr-x
0s DEBU add byline.js: size=4710 mode=-rwxr-xr-x
0s DEBU filtered cmd – 4096
232ms DEBU add main: size=11290511 mode=-rwxrwxr-x
0s DEBU filtered out.zip – 8255515
282ms DEBU add server: size=14076364 mode=-rwxrwxr-x
0s DEBU add up.json: size=266 mode=-rw-rw-r--
0s DEBU filtered vendor – 4096
0s DEBU stats dirs_filtered=2 files_added=5 files_filtered=6 size_uncompressed=25 MB
4ms DEBU close
0s DEBU event platform.build.zip map[files:5 size_uncompressed:25372782 size_compressed:8255515 duration:646.186383ms]
2ms DEBU removing proxy
⠼ 0s DEBU event platform.build.complete map[duration:1.418690161s]
~/go/src/github.com/apex/up-examples/oss/golang-gin$ zipinfo out.zip
Archive: out.zip
Zip file size: 8255515 bytes, number of entries: 5
-rwxr-xr-x 2.0 unx 931 bl defN 17-Sep-11 03:58 _proxy.js
-rwxr-xr-x 2.0 unx 4710 bl defN 17-Sep-11 03:58 byline.js
-rwxrwxr-x 2.0 unx 11290511 bl defN 17-Sep-11 03:58 main
-rwxrwxr-x 2.0 unx 14076364 bl defN 17-Sep-11 03:58 server
-rw-rw-r-- 2.0 unx 266 bl defN 17-Sep-11 03:17 up.json
5 files, 25372782 bytes uncompressed, 8254963 bytes compressed: 67.5%
~/go/src/github.com/apex/up-examples/oss/golang-gin$
0s DEBU filtered cmd – 4096
very odd, that looks like a bug to me, curious if !cmd/**
works, but I would expect what you have to work. I'll look into it tomorrow.
Ideally we output the pattern which performed the match as well to help debug.
hmm ok so I was able to use:
*
!cmd/**
but not:
!cmd
which I would expect to work, I swear that's what GIT allows as well
damn yeah confirmed that these don't work:
!cmd/api/**
!cmd/api
as they should. I'll open an issue and get that fixed up, sorry about that, test coverage there sucks apparently :D
ah I see the problem, I'll update the issue
I am running into:
Using https://github.com/apex/up-examples/tree/master/oss/golang-gin as a starting point.
Also I am confused by https://github.com/apex/up-examples/commit/793c4551692ee652b37704c5214dc15239c86580 Since IIUC ./server is included regardless, why bother black listing it?
Sorry, back to my issue. I am not sure how to include the templates so the up deployed lambda can find it: https://s.natalian.org/2017-09-11/upignore.zip