Skip to content

Commit

Permalink
Update deco (#38)
Browse files Browse the repository at this point in the history
* Update go.mod and sum. Add tests.yaml

* Move cmd files to cli. Moved main.go into cmd/deco. Updated .goreleaser.yml

* Update README.md

* Added status badges to README.md

---------

Co-authored-by: bt353 <[email protected]>
  • Loading branch information
btassone and bt353 authored Dec 16, 2023
1 parent c9cd8ad commit b060eb5
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 491 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: tests
on:
push:

jobs:
tests-off:
name: ${{ matrix.os }} - Go v${{ matrix.go-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version:
- "1.21.x"
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"

steps:
- uses: actions/checkout@v4

- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Test
run: |
go mod tidy -v
go test -cover ./...
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ builds:
- linux
- windows
- darwin
main: ./cmd/deco
release:
prerelease: auto
name_template: "{{.ProjectName}}-v{{.Version}}"
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

`deco` is short for **D**ocker **E**nvironment **Co**ntrol

---
[![goreleaser](https://github.com/YaleUniversity/deco/actions/workflows/releaser.yml/badge.svg)](https://github.com/YaleUniversity/deco/actions/workflows/releaser.yml)
[![tests](https://github.com/YaleUniversity/deco/actions/workflows/tests.yaml/badge.svg)](https://github.com/YaleUniversity/deco/actions/workflows/tests.yaml)
## Command Usage

`deco` has three options currently, `validate`, `show`, and `run`.
Expand Down Expand Up @@ -202,6 +205,7 @@ fi
## Author

E Camden Fisher <[email protected]>
Brandon Tassone <[email protected]>

## License

Expand Down
2 changes: 1 addition & 1 deletion cmd/encrypt.go → cli/encrypt.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package cli

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go → cli/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package cli

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/run.go → cli/run.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package cli

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion cmd/show.go → cli/show.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package cli

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion cmd/validate.go → cli/validate.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package cli

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go → cli/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package cli

import (
"fmt"
Expand Down
6 changes: 3 additions & 3 deletions main.go → cmd/deco/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "github.com/YaleUniversity/deco/cmd"
import "github.com/YaleUniversity/deco/cli"

var (
version = "v0.0.0"
Expand All @@ -9,11 +9,11 @@ var (
)

func main() {
cmd.Version = &cmd.CmdVersion{
cli.Version = &cli.CmdVersion{
AppVersion: version,
BuildTime: date,
GitCommit: commit,
}

cmd.Execute()
cli.Execute()
}
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ module github.com/YaleUniversity/deco
go 1.21

require (
github.com/aws/aws-sdk-go v1.45.25
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.17.0
golang.org/x/crypto v0.14.0
github.com/aws/aws-sdk-go v1.49.4
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.1
golang.org/x/crypto v0.16.0
)

require (
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
497 changes: 27 additions & 470 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit b060eb5

Please sign in to comment.