(ctx context.Context, dir, filename string, opts *Options)
| 70 | } |
| 71 | |
| 72 | func Push(ctx context.Context, dir, filename string, opts *Options) error { |
| 73 | e := opts.Env |
| 74 | stderr := opts.Stderr |
| 75 | configPath, conf, err := readConfig(stderr, dir, filename) |
| 76 | if err != nil { |
| 77 | return err |
| 78 | } |
| 79 | up := bundler.NewUploader(configPath, dir, conf) |
| 80 | if err := up.Validate(); err != nil { |
| 81 | return err |
| 82 | } |
| 83 | p := &pusher{} |
| 84 | if err := Process(ctx, p, dir, filename, opts); err != nil { |
| 85 | return err |
| 86 | } |
| 87 | if e.DryRun { |
| 88 | return up.DumpRequestOut(ctx, p.results) |
| 89 | } else { |
| 90 | return up.Upload(ctx, p.results, opts.Tags) |
| 91 | } |
| 92 | } |
no test coverage detected