Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite CLI in Go #178

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
/.pytest_cache
/.tox
/build
/cli/build
/cli/dist
/cli/cli
/dist
/fluffy/static/**/*.hash
/fluffy/static/app.css
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ export FLUFFY_SETTINGS := $(CURDIR)/settings.py
.PHONY: minimal
minimal: $(VENV) assets settings.py install-hooks

$(VENV): setup.py cli/setup.py requirements.txt requirements-dev.txt
cli/cli: cli/main.go cli/go.mod
cd cli && go build -o cli

$(VENV): setup.py requirements.txt requirements-dev.txt cli/cli
rm -rf $@
virtualenv -ppython3.11 $@
$@/bin/pip install -r requirements.txt -r requirements-dev.txt -e cli -e .
$@/bin/pip install -r requirements.txt -r requirements-dev.txt -e .
ln -fs ../../cli/cli $@/bin/fput
ln -fs ../../cli/cli $@/bin/fpb

fluffy/static/app.css: $(VENV) $(wildcard fluffy/static/scss/*.scss)
$(BIN)/pysassc fluffy/static/scss/app.scss $@
Expand Down Expand Up @@ -46,6 +51,7 @@ dev: $(VENV) fluffy/static/app.css

.PHONY: test
test: $(VENV)
cd cli && go test -v ./...
$(BIN)/coverage erase
COVERAGE_PROCESS_START=$(CURDIR)/.coveragerc \
$(BIN)/py.test --tb=native -vv tests/
Expand Down
6 changes: 0 additions & 6 deletions cli/debian/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions cli/debian/changelog

This file was deleted.

1 change: 0 additions & 1 deletion cli/debian/compat

This file was deleted.

17 changes: 0 additions & 17 deletions cli/debian/control

This file was deleted.

21 changes: 0 additions & 21 deletions cli/debian/rules

This file was deleted.

1 change: 0 additions & 1 deletion cli/debian/source/format

This file was deleted.

1 change: 0 additions & 1 deletion cli/fluffy_cli/__init__.py

This file was deleted.

207 changes: 0 additions & 207 deletions cli/fluffy_cli/main.py

This file was deleted.

1 change: 1 addition & 0 deletions cli/fpb
1 change: 1 addition & 0 deletions cli/fput
15 changes: 15 additions & 0 deletions cli/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module github.com/chriskuehl/fluffy/cli

go 1.23.0

require (
github.com/adrg/xdg v0.4.0
github.com/spf13/cobra v1.8.0
golang.org/x/term v0.16.0
)

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/sys v0.16.0 // indirect
)
26 changes: 26 additions & 0 deletions cli/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls=
github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Loading
Loading