Kévin Dunglas
5734acdd58
Add XCADDY_SKIP_BUILD option ( #41 )
...
* feat: add XCADDY_NO_BUILD to not run go build
* Rename XCADDY_NO_BUILD to XCADDY_SKIP_BUILD
* fix rebase
2021-02-05 16:34:51 -07:00
Mohammed Al Sahaf
e7b19b13a2
Run go mod tidy
in the build environment ( #47 )
...
* Run `go mod tidy` in the build environment
As of go 1.16, the `go {build,test}` commands don't modify the go.mod and go.sum files (see: https://golang.org/issue/40728 ). We, therefore, have to run `go mod tidy` to ensure the go.mod and go.sum files are consistent with the module requirements.
Closes #46
* check the error of `go mod tidy`
2021-02-05 10:49:17 -07:00
Matthew Holt
dabafeef18
Support setcap in dev mode (XCADDY_SETCAP)
...
When I first wrote xcaddy I was on macOS which does not
require permission to bind to low ports. Now I'm on Linux.
The XCADDY_SETCAP env var will cause xcaddy to run setcap
on the generated temporary binary before executing it
so that it can bind to low ports. This requires sudo.
2021-01-20 12:17:46 -07:00
Matthew Holt
623c361726
Resolve relative replacements
...
This allows us to use user-defined replacements that have a
relative path, since our temporary modules exist in different dirs.
2021-01-19 14:49:54 -07:00
Francis Lavoie
a9fc1ead03
ci: Fix echo message on Cloudsmith push ( #43 )
...
We're actually pushing to the `xcaddy` cloudsmith repo, not `testing` (copy-pasted from `caddy` repo, so it had the wrong string). Purely a visual bug.
2020-12-30 11:56:40 -07:00
Francis Lavoie
a341e5403d
ci: Pull updates from Caddy, build .deb as well ( #42 )
...
* ci: Pull updates from Caddy, build .deb as well
* ci: Pull ci.yml updates from Caddy, including testing on Go 1.15
* ci: Add publishing to Cloudsmith
* ci: Update release.yml to match changes in Caddy
* ci: Switch to keeping armv7 as the armhf .deb
2020-12-30 11:06:56 -07:00
Matthew Holt
f74ee60bd8
Update readme, specify local binary when executing
2020-12-28 08:49:32 -07:00
Jayson Reis
4f3e0ef756
Fix main.go generation when executing on a windows machine ( #32 )
...
* Fix main.go generation when executing on a windows machine
When normalizing the `importPath` it will try to write on `main.go` files with imports
like `github.com/caddyserver/xcaddy/c:\xcaddy`
* Apply CR suggestions
* Add test cases for sub-paths on normalizeImportPath
* Run windows tests only when GOOS matches
2020-09-25 17:39:48 -06:00
Jayson Reis
13c49c3566
Fix runDev when running on windows ( #33 )
...
Extract default output file to a function and reuse it in both runBuild and runDev
2020-08-26 12:36:51 -06:00
Francis Lavoie
53742c9c2d
Update .gitignore ( #31 )
2020-08-19 07:09:48 -06:00
jpughcs
b7fd102f41
Support go.mod replace version pinning ( #27 )
...
* support go.mod replace version pinning
* use string replace instead of regex
* Minor cleanups
Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2020-08-10 12:27:38 -06:00
Mohammed Al Sahaf
1fec98156c
ci: immediately publish releases on tags ( #26 )
2020-07-31 22:18:53 +00:00
Matthew Holt
e11b1988bd
readme: Add env var docs
2020-07-16 16:07:50 -06:00
Matthew Holt
1d18c5862c
Rename ModulePath -> PackagePath
...
Technically they are packages to be imported, not necessarily paths to
the containing Go module.
2020-07-15 17:45:32 -06:00
Matthew Holt
3742b72df8
Optionally skip cleanup; fix cgo when race detector enabled
2020-07-15 17:44:06 -06:00
Matthew Holt
8266ddc40e
Handle package import paths that are in subfolders of Go module path
2020-06-16 15:08:00 -06:00
Matthew Holt
823a072ae1
Only run compiled binary if same platform ( fixes #20 )
2020-05-26 16:42:56 -06:00
Matthew Holt
23d4e0a1ca
Fix env var name, update readme
2020-05-23 16:32:48 -06:00
Mohammed Al Sahaf
5f7bbca89f
chore: add CI/CD with GitHub Actions ( #19 )
2020-05-22 14:06:12 -06:00
Matthew Holt
a1e17ca9b9
Honor CGO_ENABLED environment variable ( fix #17 )
2020-05-22 10:31:34 -06:00
Matthew Holt
4ce3d1db07
Add race detector support; update readme
2020-05-09 18:59:18 -06:00
Matthew Holt
1eaff742db
Disable timeouts by default, make configurable ( fix #15 )
2020-05-07 10:21:12 -06:00
Matthew Holt
446eab4eb6
Update readme
2020-05-02 18:22:59 -06:00
Matthew Holt
9146f00342
Minor improvements; print go list errors, strip trailing slashes
2020-05-02 17:32:37 -06:00
Jason Song
5edadff2c7
docs: update library usage ( #8 )
2020-04-28 11:07:59 -06:00
Jason Song
262a495997
Make customized env effective ( #9 )
2020-04-28 11:07:25 -06:00
Matthew Holt
68d27a0401
Only cleanup temporary file after run is over
...
Mac apparently sends SIGKILL to processes spawned by a process that no
longer exists on disk! ... or something like that.
2020-04-23 15:04:06 -06:00
Matthew Holt
7e4f9a06d3
Housekeeping
2020-04-23 14:36:17 -06:00
Matthew Holt
6f998dab69
Improved cross-platform support
2020-04-23 14:34:29 -06:00
Matthew Holt
5a59fd84d5
Fix typo
2020-04-22 16:40:25 -06:00
Matthew Holt
fd8e902223
Support replacements and customizing the core version; update readme
2020-04-22 16:29:57 -06:00
Matthew Holt
681037f5e1
Fix arg syntax if version is omitted
2020-04-13 12:44:37 -06:00
Matthew Holt
dcc00b0892
Support context cancellation and cleanup
...
This should avoid leaving temporary build directories lingering after
Ctrl+C.
2020-04-13 12:22:23 -06:00
Matthew Holt
97dd3289b0
Improve docs
2020-04-07 18:56:30 -06:00
Matthew Holt
1095882d94
Fix readme example... again
2020-04-04 10:01:09 -06:00
Matthew Holt
35c6866159
Improve exported API, update docs
2020-04-04 09:56:41 -06:00
Ankur Srivastava
9933d7ffe7
added go-get instructions for xcaddy ( #4 )
...
Signed-off-by: Ankur Srivastava <ankur.srivastava@email.de>
Co-authored-by: Ankur Srivastava <ankur.srivastava@recogizer-analytics.com>
2020-04-02 09:05:25 -06:00
Matthew Holt
f337ff945a
Update name to xcaddy
2020-04-02 08:35:27 -06:00
Mohammed Al Sahaf
22d82434ea
fix off-by-one error ( #3 )
2020-03-29 10:13:05 -06:00
Matthew Holt
1cc8e08c16
Update CLI; change command to 'xcaddy'; update readme
2020-03-25 00:03:28 -06:00
Matthew Holt
40c0796cc2
Greatly lengthen exec timeouts... for now
2020-03-21 16:29:10 -06:00
Matthew Holt
362c34597d
Assume Caddy v2 if no semantic version is available
...
Useful if providing just a commit SHA
2020-03-21 16:27:26 -06:00
Matthew Holt
01dba9ce94
Add gitignore
2020-03-21 16:26:52 -06:00
Mohammed Al Sahaf
203ce92701
readme: ensure the example is valid Go ( #1 )
2020-03-21 16:13:31 -06:00
Matthew Holt
6004fc79b2
Initial commit
2020-03-21 14:31:29 -06:00