diff --git a/blank/{{ cookiecutter.project_name }}/.github/workflows/pre-commit.yml b/blank/{{ cookiecutter.project_name }}/.github/workflows/pre-commit.yml index 5a91595..b2379de 100644 --- a/blank/{{ cookiecutter.project_name }}/.github/workflows/pre-commit.yml +++ b/blank/{{ cookiecutter.project_name }}/.github/workflows/pre-commit.yml @@ -13,10 +13,12 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: '>=1.20.0' diff --git a/blank/{{ cookiecutter.project_name }}/.gitpod.yml b/blank/{{ cookiecutter.project_name }}/.gitpod.yml index aa2c418..5f6620e 100644 --- a/blank/{{ cookiecutter.project_name }}/.gitpod.yml +++ b/blank/{{ cookiecutter.project_name }}/.gitpod.yml @@ -23,3 +23,4 @@ vscode: - EditorConfig.EditorConfig - waderyan.gitblame - GitHub.vscode-github-actions + - ms-vscode.makefile-tools diff --git a/golang-cobra/{{ cookiecutter.project_name }}/.github/workflows/build.yml b/golang-cobra/{{ cookiecutter.project_name }}/.github/workflows/build.yml index 6a959b1..f0c8ab2 100644 --- a/golang-cobra/{{ cookiecutter.project_name }}/.github/workflows/build.yml +++ b/golang-cobra/{{ cookiecutter.project_name }}/.github/workflows/build.yml @@ -19,25 +19,20 @@ jobs: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: '>=1.20.0' + go-version-file: go.mod - - name: Install dependencies - run: | - go install ./... + - uses: actions/setup-python@v4 + with: + python-version: 3.x - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - go install github.com/kisielk/errcheck@latest - go install mvdan.cc/gofumpt@latest - go install honnef.co/go/tools/cmd/staticcheck@latest - go install golang.org/x/tools/cmd/goimports@latest + - name: Install dependencies + run: go install ./... - name: go-vet run: go vet -v ./... - - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.0 build: diff --git a/golang-cobra/{{ cookiecutter.project_name }}/.gitpod.Dockerfile b/golang-cobra/{{ cookiecutter.project_name }}/.gitpod.Dockerfile deleted file mode 100644 index f6dae80..0000000 --- a/golang-cobra/{{ cookiecutter.project_name }}/.gitpod.Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM gitpod/workspace-full - -# Gitpod Package Manager -RUN curl -sfL gpm.simonemms.com | bash \ - && gpm install pre-commit - -# Golang dependencies -RUN go install github.com/spf13/cobra-cli@latest \ - && go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest \ - && go install github.com/kisielk/errcheck@latest \ - && go install mvdan.cc/gofumpt@latest \ - && go install honnef.co/go/tools/cmd/staticcheck@latest \ - && go install golang.org/x/tools/cmd/goimports@latest diff --git a/golang-cobra/{{ cookiecutter.project_name }}/.gitpod.yml b/golang-cobra/{{ cookiecutter.project_name }}/.gitpod.yml index ff93280..0b87c86 100644 --- a/golang-cobra/{{ cookiecutter.project_name }}/.gitpod.yml +++ b/golang-cobra/{{ cookiecutter.project_name }}/.gitpod.yml @@ -1,9 +1,16 @@ -image: - file: .gitpod.Dockerfile - tasks: - name: Setup command: | + curl -sfL gpm.simonemms.com | bash + + gpm install pre-commit + + pip install cookieninja cruft + + go install github.com/spf13/cobra-cli@latest + + gp sync-done setup + pre-commit install --install-hooks -t pre-commit -t commit-msg gp sync-done pre-commit @@ -14,6 +21,8 @@ tasks: go install ./... fi command: | + gp sync-await setup + # Copy .cobra.yaml to $HOME ln -s $PWD/.cobra.yaml $HOME/.cobra.yaml @@ -34,4 +43,7 @@ vscode: extensions: - donjayamanne.git-extension-pack - EditorConfig.EditorConfig + - waderyan.gitblame + - GitHub.vscode-github-actions + - ms-vscode.makefile-tools - golang.go diff --git a/golang-cobra/{{ cookiecutter.project_name }}/.pre-commit-config.yaml b/golang-cobra/{{ cookiecutter.project_name }}/.pre-commit-config.yaml index f99c9de..7f9e1e6 100644 --- a/golang-cobra/{{ cookiecutter.project_name }}/.pre-commit-config.yaml +++ b/golang-cobra/{{ cookiecutter.project_name }}/.pre-commit-config.yaml @@ -38,6 +38,6 @@ repos: hooks: - id: markdownlint-cli2 - repo: https://github.com/golangci/golangci-lint - rev: v1.53.2 + rev: v1.54.1 hooks: - id: golangci-lint