mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 02:31:10 +00:00
address review comments & fixes
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
2162d212ac
commit
fb0a13755d
@ -1,15 +1,14 @@
|
||||
ARG GO_VERSION=1.24.3
|
||||
FROM golang:1.24.3
|
||||
|
||||
ARG GOLANGCI_LINT_VERSION=2.1.6 # renovate: depName=golangci/golangci-lint datasource=github-releases
|
||||
|
||||
FROM golang:${GO_VERSION}
|
||||
|
||||
# install docker
|
||||
RUN apt update && apt upgrade -y && apt-get install -y ca-certificates curl gnupg lsb-release jq zsh neovim && \
|
||||
RUN apt update && apt upgrade -y && \
|
||||
apt-get install --no-install-recommends -y ca-certificates curl gnupg lsb-release jq zsh neovim && \
|
||||
chsh -s $(which zsh) && \
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
||||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v${GOLANGCI_LINT_VERSION}
|
||||
|
||||
|
||||
RUN curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh && \
|
||||
|
@ -50,8 +50,7 @@
|
||||
// Set *default* container specific settings.json values on container create.
|
||||
"settings": {
|
||||
"go.toolsManagement.checkForUpdates": "local",
|
||||
"go.useLanguageServer": true,
|
||||
"go.gopath": "/go"
|
||||
"go.useLanguageServer": true
|
||||
},
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Display welcome banner
|
||||
echo -e "\033[1;36m"
|
||||
|
@ -54,8 +54,16 @@ If you are using VS Code, feel free to copy `settings.json` from `.vscode/settin
|
||||
|
||||
## Devcontainer support
|
||||
|
||||
The project uses a devcontainer to provide a consistent development environment.
|
||||
If you are using VS Code, you can use the devcontainer by opening the project in a container.
|
||||
Prerequisites:
|
||||
|
||||
- Docker (or Docker Desktop) installed on your machine
|
||||
- [VS Code Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
|
||||
|
||||
To launch the devcontainer:
|
||||
|
||||
1. Open the project in VS Code.
|
||||
2. Run **Remote-Containers: Open Folder in Container** from the Command Palette.
|
||||
|
||||
See [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers) for more details.
|
||||
|
||||
## Testing
|
||||
|
6
Makefile
6
Makefile
@ -116,11 +116,11 @@ lint: ensure-golangci-lint
|
||||
golangci-lint run --fix
|
||||
|
||||
.PHONY: ensure-golangci-lint
|
||||
ensure-golangci-lint:
|
||||
@CURRENT_VERSION=$$(golangci-lint version --short 2>/dev/null || echo "not installed"); \
|
||||
ensure-golangci-lint:
|
||||
@CURRENT_VERSION=$$(golangci-lint version --short 2>/dev/null | sed 's/^v//' || echo "not installed"); \
|
||||
if [ "$$CURRENT_VERSION" != "$(GOLANGCI_LINT_VERSION)" ]; then \
|
||||
echo "Installing golangci-lint $(GOLANGCI_LINT_VERSION) (current: $$CURRENT_VERSION)"; \
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin $(GOLANGCI_LINT_VERSION); \
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v$(GOLANGCI_LINT_VERSION); \
|
||||
fi
|
||||
|
||||
.PHONY: release-build
|
||||
|
Loading…
Reference in New Issue
Block a user