Skip to content

Commit

Permalink
chore: remove submodules
Browse files Browse the repository at this point in the history
They're actually really annoying to deal with.
  • Loading branch information
alecthomas committed May 26, 2024
1 parent 54d3321 commit d4bcd0b
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 184 deletions.
7 changes: 7 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ tag:
git tag -f "cmd/scaffolder/$version"
git tag -f "extensions/javascript/$version"
echo "use 'git push && git push --tags' to push the tags to the remote"

release:
#!/bin/bash
set -euxo pipefail
cd cmd/scaffolder
version=$(svu current)
go build -ldflags "-X main.version=$version" -o scaffolder .
21 changes: 0 additions & 21 deletions cmd/scaffolder/go.mod

This file was deleted.

67 changes: 0 additions & 67 deletions cmd/scaffolder/go.sum

This file was deleted.

11 changes: 7 additions & 4 deletions cmd/scaffolder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ import (
"github.com/TBD54566975/scaffolder/extensions/javascript"
)

var version string = "dev"

var cli struct {
JSON *os.File `help:"JSON file containing the context to use."`
Template string `arg:"" help:"Template directory." type:"existingdir"`
Dest string `arg:"" help:"Destination directory to scaffold." type:"existingdir"`
Version kong.VersionFlag `help:"Show version."`
JSON *os.File `help:"JSON file containing the context to use."`
Template string `arg:"" help:"Template directory." type:"existingdir"`
Dest string `arg:"" help:"Destination directory to scaffold." type:"existingdir"`
}

func main() {
kctx := kong.Parse(&cli)
kctx := kong.Parse(&cli, kong.Vars{"version": version})
context := json.RawMessage{}
if cli.JSON != nil {
if err := json.NewDecoder(cli.JSON).Decode(&context); err != nil {
Expand Down
18 changes: 0 additions & 18 deletions extensions/javascript/go.mod

This file was deleted.

63 changes: 0 additions & 63 deletions extensions/javascript/go.sum

This file was deleted.

11 changes: 10 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ module github.com/TBD54566975/scaffolder

go 1.22.2

require github.com/alecthomas/assert/v2 v2.9.0
require (
github.com/alecthomas/assert/v2 v2.9.0
github.com/alecthomas/kong v0.9.0
github.com/dop251/goja v0.0.0-20240516125602-ccbae20bcec2
github.com/iancoleman/strcase v0.3.0
)

require (
github.com/alecthomas/repr v0.4.0 // indirect
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
golang.org/x/text v0.3.8 // indirect
)
26 changes: 16 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
github.com/alecthomas/assert/v2 v2.4.1 h1:mwPZod/d35nlaCppr6sFP0rbCL05WH9fIo7lvsf47zo=
github.com/alecthomas/assert/v2 v2.4.1/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM=
github.com/alecthomas/assert/v2 v2.5.0 h1:OJKYg53BQx06/bMRBSPDCO49CbCDNiUQXwdoNrt6x5w=
github.com/alecthomas/assert/v2 v2.5.0/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM=
github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU=
github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/assert/v2 v2.8.1 h1:YCxnYR6jjpfnEK5AK5SysALKdUEBPGH4Y7As6tBnDw0=
github.com/alecthomas/assert/v2 v2.8.1/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/assert/v2 v2.9.0 h1:ZcLG8ccMEtlMLkLW4gwGpBWBb0N8MUCmsy1lYBVd1xQ=
github.com/alecthomas/assert/v2 v2.9.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8=
github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/kong v0.9.0 h1:G5diXxc85KvoV2f0ZRVuMsi45IrBgx9zDNGNj165aPA=
github.com/alecthomas/kong v0.9.0/go.mod h1:Y47y5gKfHp1hDc7CH7OeXgLIpp+Q2m1Ni0L5s3bI8Os=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo=
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dop251/goja v0.0.0-20240516125602-ccbae20bcec2 h1:OFTHt+yJDo/uaIKMGjEKzc3DGhrpQZoqvMUIloZv6ZY=
github.com/dop251/goja v0.0.0-20240516125602-ccbae20bcec2/go.mod h1:o31y53rb/qiIAONF7w3FHJZRqqP3fzHUr1HqanthByw=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U=
github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=
github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

0 comments on commit d4bcd0b

Please sign in to comment.