add automated copyright header check (#1696)

Signed-off-by: ollevche <ollevche@gmail.com>
Signed-off-by: Oleksandr Levchenkov <ollevche@gmail.com>
This commit is contained in:
Oleksandr Levchenkov 2024-06-03 16:49:36 +03:00 committed by GitHub
parent ab9c995064
commit 5a161c8bcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
85 changed files with 306 additions and 55 deletions

View File

@ -13,6 +13,9 @@ project {
# files or folders should be ignored # files or folders should be ignored
header_ignore = [ header_ignore = [
"**/*.tf", "**/*.tf",
"**/*.tftest.hcl",
"testing/equivalence-tests/**/.terraform.lock.hcl",
"website/docs/**/examples/**",
"**/testdata/**", "**/testdata/**",
"**/*.pb.go", "**/*.pb.go",
"**/*_string.go", "**/*_string.go",

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package main package main
import ( import (

View File

@ -215,6 +215,14 @@ jobs:
version: v1.58 version: v1.58
only-new-issues: true only-new-issues: true
- name: "Copyright headers"
run: |
go run github.com/hashicorp/copywrite headers --plan
if [[ $? != 0 ]]; then
echo >&2 "ERROR: some files are missing required copyright headers. Run `scripts/add-copyright-headers.sh` locally and then commit the updated files."
exit 1
fi
license-checks: license-checks:
name: "License Checks" name: "License Checks"
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -1,3 +1,8 @@
# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
run: run:
timeout: 30m timeout: 30m

View File

@ -1,15 +0,0 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
//go:build tools
// +build tools
package main
import (
_ "github.com/hashicorp/copywrite"
)
//go:generate go run github.com/hashicorp/copywrite headers

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package addrs package addrs
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package collections package collections
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package collections_test package collections_test
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package e2etest package e2etest
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package e2etest package e2etest
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package command package command
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package command package command
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package hcl2shim package hcl2shim
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package configs package configs
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aws_kms package aws_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aws_kms package aws_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aws_kms package aws_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aws_kms package aws_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aws_kms package aws_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aws_kms package aws_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aws_kms package aws_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package keyprovider package keyprovider
import "fmt" import "fmt"

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package gcp_kms package gcp_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package gcp_kms package gcp_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package gcp_kms package gcp_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package gcp_kms package gcp_kms
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package openbao package openbao
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package openbao package openbao
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package openbao package openbao
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package openbao package openbao
import "github.com/opentofu/opentofu/internal/encryption/keyprovider" import "github.com/opentofu/opentofu/internal/encryption/keyprovider"

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package openbao package openbao
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package keyprovider package keyprovider
import "github.com/zclconf/go-cty/cty" import "github.com/zclconf/go-cty/cty"

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aesgcm package aesgcm
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aesgcm_test package aesgcm_test
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aesgcm package aesgcm
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aesgcm_test package aesgcm_test
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aesgcm_test package aesgcm_test
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aesgcm package aesgcm
import "fmt" import "fmt"

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aesgcm package aesgcm
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package method package method
import "fmt" import "fmt"

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package unencrypted package unencrypted
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package blocktoattr package blocktoattr
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package convert package convert
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package convert package convert
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package tofu package tofu
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package tofu package tofu
import ( import (

View File

@ -1,3 +1,8 @@
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package tofu package tofu
import ( import (

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
go run github.com/hashicorp/copywrite headers

View File

@ -13,6 +13,7 @@ package tools
// Go toolchain to see that we need to include them in go.mod and go.sum. // Go toolchain to see that we need to include them in go.mod and go.sum.
import ( import (
_ "github.com/hashicorp/copywrite"
_ "github.com/nishanths/exhaustive/cmd/exhaustive" _ "github.com/nishanths/exhaustive/cmd/exhaustive"
_ "golang.org/x/tools/cmd/stringer" _ "golang.org/x/tools/cmd/stringer"
_ "honnef.co/go/tools/cmd/staticcheck" _ "honnef.co/go/tools/cmd/staticcheck"

View File

@ -33,3 +33,7 @@ To update the sidebar navigation, you must edit the appropriate `nav-data.json`
Currently, you can preview your changes through the [opentofu/opentofu.org](https://github.com/opentofu/opentofu.org/blob/main/README.md) repository. Currently, you can preview your changes through the [opentofu/opentofu.org](https://github.com/opentofu/opentofu.org/blob/main/README.md) repository.
Follow the [Getting Started](https://github.com/opentofu/opentofu.org/blob/main/README.md#getting-started) guide. Follow the [Getting Started](https://github.com/opentofu/opentofu.org/blob/main/README.md#getting-started) guide.
## Copyright headers for code examples
In order to not include copyright headers for code examples used in docs, please, add the files under `examples` folder. This way, it will be ignored on automated copyright headers check.

View File

@ -1,2 +0,0 @@
Please do not add license headers and end-of-file line breaks to the examples in this folder.
They are embedded in the website, and it makes for really hard reading to have license headers 5-6 times in a page.

View File

@ -8,8 +8,8 @@ description: |-
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs'; import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem'; import TabItem from '@theme/TabItem';
import ApkConvenienceScript from '!!raw-loader!./alpine-convenience.sh' import ApkConvenienceScript from '!!raw-loader!./examples/alpine-convenience.sh'
import ApkManualScript from '!!raw-loader!./alpine-manual.sh' import ApkManualScript from '!!raw-loader!./examples/alpine-manual.sh'
# Installing OpenTofu on Alpine Linux # Installing OpenTofu on Alpine Linux

View File

@ -1,13 +1,18 @@
#!/bin/sh #!/bin/sh
# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
set -e set -e
apk add curl apk add curl
if [ "$1" = "--convenience" ]; then if [ "$1" = "--convenience" ]; then
sh -x alpine-convenience.sh sh -x examples/alpine-convenience.sh
else else
sh -x alpine-manual.sh sh -x examples/alpine-manual.sh
fi fi
tofu --version tofu --version

View File

@ -1,4 +1,9 @@
#!/bin/bash #!/bin/bash
# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
set -ex set -ex
@ -10,6 +15,6 @@ apt-get install -y curl git build-essential gcc procps curl file
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /root/.bashrc (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /root/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
bash -x brew-install.sh bash -x examples/brew-install.sh
tofu --version tofu --version

View File

@ -8,8 +8,8 @@ description: |-
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs'; import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem'; import TabItem from '@theme/TabItem';
import ApkConvenienceScript from '!!raw-loader!./alpine-convenience.sh' import ApkConvenienceScript from '!!raw-loader!./examples/alpine-convenience.sh'
import ApkManualScript from '!!raw-loader!./alpine-manual.sh' import ApkManualScript from '!!raw-loader!./examples/alpine-manual.sh'
# Installing OpenTofu on FreeBSD # Installing OpenTofu on FreeBSD

View File

@ -6,11 +6,11 @@ description: |-
--- ---
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import DebConvenienceScript from '!!raw-loader!./deb-convenience.sh' import DebConvenienceScript from '!!raw-loader!./examples/deb-convenience.sh'
import DebStep1Script from '!!raw-loader!./deb-step1.sh' import DebStep1Script from '!!raw-loader!./examples/deb-step1.sh'
import DebStep2Script from '!!raw-loader!./deb-step2.sh' import DebStep2Script from '!!raw-loader!./examples/deb-step2.sh'
import DebStep3Script from '!!raw-loader!./deb-step3.sh' import DebStep3Script from '!!raw-loader!./examples/deb-step3.sh'
import DebStep4Script from '!!raw-loader!./deb-step4.sh' import DebStep4Script from '!!raw-loader!./examples/deb-step4.sh'
import Buildkite from './buildkite' import Buildkite from './buildkite'
# Installing OpenTofu on .deb-based Linux (Debian, Ubuntu, etc.) # Installing OpenTofu on .deb-based Linux (Debian, Ubuntu, etc.)

View File

@ -1,4 +1,9 @@
#!/bin/bash #!/bin/bash
# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
set -e set -e
@ -6,12 +11,12 @@ apt update
apt install -y sudo curl apt install -y sudo curl
if [ "$1" = "--convenience" ]; then if [ "$1" = "--convenience" ]; then
bash -ex deb-convenience.sh bash -ex examples/deb-convenience.sh
else else
bash -ex deb-step1.sh bash -ex examples/deb-step1.sh
bash -ex deb-step2.sh bash -ex examples/deb-step2.sh
bash -ex deb-step3.sh bash -ex examples/deb-step3.sh
bash -ex deb-step4.sh bash -ex examples/deb-step4.sh
fi fi
tofu --version tofu --version

View File

@ -6,8 +6,8 @@ description: |-
--- ---
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import DockerPullScript from '!!raw-loader!./docker-pull.sh' import DockerPullScript from '!!raw-loader!./examples/docker-pull.sh'
import DockerRunScript from '!!raw-loader!./docker-run.sh' import DockerRunScript from '!!raw-loader!./examples/docker-run.sh'
# Use OpenTofu as Docker Image # Use OpenTofu as Docker Image

View File

@ -6,7 +6,7 @@ description: |-
--- ---
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import BrewScript from '!!raw-loader!./brew-install.sh' import BrewScript from '!!raw-loader!./examples/brew-install.sh'
# Installing OpenTofu via Homebrew # Installing OpenTofu via Homebrew

View File

@ -8,11 +8,11 @@ description: |-
import Tabs from '@theme/Tabs'; import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem'; import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import RpmConvenienceScript from '!!raw-loader!./rpm-convenience.sh' import RpmConvenienceScript from '!!raw-loader!./examples/rpm-convenience.sh'
import YumRepoScript from '!!raw-loader!./repo-yum.sh' import YumRepoScript from '!!raw-loader!./examples/repo-yum.sh'
import ZypperRepoScript from '!!raw-loader!./repo-zypper.sh' import ZypperRepoScript from '!!raw-loader!./examples/repo-zypper.sh'
import YumInstallScript from '!!raw-loader!./install-yum.sh' import YumInstallScript from '!!raw-loader!./examples/install-yum.sh'
import ZypperInstallScript from '!!raw-loader!./install-zypper.sh' import ZypperInstallScript from '!!raw-loader!./examples/install-zypper.sh'
import Buildkite from "./buildkite"; import Buildkite from "./buildkite";
# Installing OpenTofu on RHEL, openSUSE, AlmaLinux and other RPM-based distributions # Installing OpenTofu on RHEL, openSUSE, AlmaLinux and other RPM-based distributions

View File

@ -1,22 +1,27 @@
#!/bin/bash #!/bin/bash
# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
set -e set -e
if [ -f /usr/bin/zypper ]; then if [ -f /usr/bin/zypper ]; then
zypper install -y sudo zypper install -y sudo
if [ "$1" = "--convenience" ]; then if [ "$1" = "--convenience" ]; then
bash -ex rpm-convenience.sh bash -ex examples/rpm-convenience.sh
else else
bash -ex repo-zypper.sh bash -ex examples/repo-zypper.sh
bash -ex install-zypper.sh bash -ex examples/install-zypper.sh
fi fi
else else
yum install -y sudo yum install -y sudo
if [ "$1" = "--convenience" ]; then if [ "$1" = "--convenience" ]; then
bash -ex rpm-convenience.sh bash -ex examples/rpm-convenience.sh
else else
bash -ex repo-yum.sh bash -ex examples/repo-yum.sh
bash -ex install-yum.sh bash -ex examples/install-yum.sh
fi fi
fi fi

View File

@ -8,13 +8,13 @@ description: |-
import Tabs from '@theme/Tabs'; import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem'; import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import LinuxScript from '!!raw-loader!./standalone-install.sh' import LinuxScript from '!!raw-loader!./examples/standalone-install.sh'
import WindowsScript from '!!raw-loader!./standalone-install.ps1' import WindowsScript from '!!raw-loader!./examples/standalone-install.ps1'
import VerifyChecksumPS1 from '!!raw-loader!./verify-checksum.ps1' import VerifyChecksumPS1 from '!!raw-loader!./examples/verify-checksum.ps1'
import VerifyChecksumLinux from '!!raw-loader!./verify-checksum-linux.sh' import VerifyChecksumLinux from '!!raw-loader!./examples/verify-checksum-linux.sh'
import VerifyChecksumMacOS from '!!raw-loader!./verify-checksum-macos.sh' import VerifyChecksumMacOS from '!!raw-loader!./examples/verify-checksum-macos.sh'
import VerifyCosignLinux from '!!raw-loader!./verify-cosign.sh' import VerifyCosignLinux from '!!raw-loader!./examples/verify-cosign.sh'
import VerifyCosignWindows from '!!raw-loader!./verify-cosign.ps1' import VerifyCosignWindows from '!!raw-loader!./examples/verify-cosign.ps1'
import Admonition from '@theme/Admonition'; import Admonition from '@theme/Admonition';
# Installing OpenTofu from GitHub Releases # Installing OpenTofu from GitHub Releases

View File

@ -1,4 +1,9 @@
#!/bin/bash #!/bin/bash
# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# This script tests the installation instructions on all relevant Linux operating systems listed in docker-compose.yaml. # This script tests the installation instructions on all relevant Linux operating systems listed in docker-compose.yaml.