mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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:
parent
ab9c995064
commit
5a161c8bcc
@ -13,6 +13,9 @@ project {
|
||||
# files or folders should be ignored
|
||||
header_ignore = [
|
||||
"**/*.tf",
|
||||
"**/*.tftest.hcl",
|
||||
"testing/equivalence-tests/**/.terraform.lock.hcl",
|
||||
"website/docs/**/examples/**",
|
||||
"**/testdata/**",
|
||||
"**/*.pb.go",
|
||||
"**/*_string.go",
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
8
.github/workflows/checks.yml
vendored
8
.github/workflows/checks.yml
vendored
@ -214,6 +214,14 @@ jobs:
|
||||
with:
|
||||
version: v1.58
|
||||
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:
|
||||
name: "License Checks"
|
||||
|
@ -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:
|
||||
timeout: 30m
|
||||
|
||||
|
@ -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
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import "fmt"
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import "github.com/opentofu/opentofu/internal/encryption/keyprovider"
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import "github.com/zclconf/go-cty/cty"
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import "fmt"
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import "fmt"
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
@ -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
|
||||
|
||||
import (
|
||||
|
7
scripts/add-copyright-headers.sh
Executable file
7
scripts/add-copyright-headers.sh
Executable 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
|
1
tools.go
1
tools.go
@ -13,6 +13,7 @@ package tools
|
||||
// Go toolchain to see that we need to include them in go.mod and go.sum.
|
||||
|
||||
import (
|
||||
_ "github.com/hashicorp/copywrite"
|
||||
_ "github.com/nishanths/exhaustive/cmd/exhaustive"
|
||||
_ "golang.org/x/tools/cmd/stringer"
|
||||
_ "honnef.co/go/tools/cmd/staticcheck"
|
||||
|
@ -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.
|
||||
|
||||
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.
|
||||
|
@ -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.
|
@ -8,8 +8,8 @@ description: |-
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import ApkConvenienceScript from '!!raw-loader!./alpine-convenience.sh'
|
||||
import ApkManualScript from '!!raw-loader!./alpine-manual.sh'
|
||||
import ApkConvenienceScript from '!!raw-loader!./examples/alpine-convenience.sh'
|
||||
import ApkManualScript from '!!raw-loader!./examples/alpine-manual.sh'
|
||||
|
||||
# Installing OpenTofu on Alpine Linux
|
||||
|
||||
|
@ -1,13 +1,18 @@
|
||||
#!/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
|
||||
|
||||
apk add curl
|
||||
|
||||
if [ "$1" = "--convenience" ]; then
|
||||
sh -x alpine-convenience.sh
|
||||
sh -x examples/alpine-convenience.sh
|
||||
else
|
||||
sh -x alpine-manual.sh
|
||||
sh -x examples/alpine-manual.sh
|
||||
fi
|
||||
|
||||
tofu --version
|
@ -1,4 +1,9 @@
|
||||
#!/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
|
||||
|
||||
@ -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
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
||||
bash -x brew-install.sh
|
||||
bash -x examples/brew-install.sh
|
||||
|
||||
tofu --version
|
||||
|
@ -8,8 +8,8 @@ description: |-
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import ApkConvenienceScript from '!!raw-loader!./alpine-convenience.sh'
|
||||
import ApkManualScript from '!!raw-loader!./alpine-manual.sh'
|
||||
import ApkConvenienceScript from '!!raw-loader!./examples/alpine-convenience.sh'
|
||||
import ApkManualScript from '!!raw-loader!./examples/alpine-manual.sh'
|
||||
|
||||
# Installing OpenTofu on FreeBSD
|
||||
|
||||
|
@ -6,11 +6,11 @@ description: |-
|
||||
---
|
||||
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import DebConvenienceScript from '!!raw-loader!./deb-convenience.sh'
|
||||
import DebStep1Script from '!!raw-loader!./deb-step1.sh'
|
||||
import DebStep2Script from '!!raw-loader!./deb-step2.sh'
|
||||
import DebStep3Script from '!!raw-loader!./deb-step3.sh'
|
||||
import DebStep4Script from '!!raw-loader!./deb-step4.sh'
|
||||
import DebConvenienceScript from '!!raw-loader!./examples/deb-convenience.sh'
|
||||
import DebStep1Script from '!!raw-loader!./examples/deb-step1.sh'
|
||||
import DebStep2Script from '!!raw-loader!./examples/deb-step2.sh'
|
||||
import DebStep3Script from '!!raw-loader!./examples/deb-step3.sh'
|
||||
import DebStep4Script from '!!raw-loader!./examples/deb-step4.sh'
|
||||
import Buildkite from './buildkite'
|
||||
|
||||
# Installing OpenTofu on .deb-based Linux (Debian, Ubuntu, etc.)
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/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
|
||||
|
||||
@ -6,12 +11,12 @@ apt update
|
||||
apt install -y sudo curl
|
||||
|
||||
if [ "$1" = "--convenience" ]; then
|
||||
bash -ex deb-convenience.sh
|
||||
bash -ex examples/deb-convenience.sh
|
||||
else
|
||||
bash -ex deb-step1.sh
|
||||
bash -ex deb-step2.sh
|
||||
bash -ex deb-step3.sh
|
||||
bash -ex deb-step4.sh
|
||||
bash -ex examples/deb-step1.sh
|
||||
bash -ex examples/deb-step2.sh
|
||||
bash -ex examples/deb-step3.sh
|
||||
bash -ex examples/deb-step4.sh
|
||||
fi
|
||||
|
||||
tofu --version
|
@ -6,8 +6,8 @@ description: |-
|
||||
---
|
||||
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import DockerPullScript from '!!raw-loader!./docker-pull.sh'
|
||||
import DockerRunScript from '!!raw-loader!./docker-run.sh'
|
||||
import DockerPullScript from '!!raw-loader!./examples/docker-pull.sh'
|
||||
import DockerRunScript from '!!raw-loader!./examples/docker-run.sh'
|
||||
|
||||
# Use OpenTofu as Docker Image
|
||||
|
||||
|
@ -6,7 +6,7 @@ description: |-
|
||||
---
|
||||
|
||||
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
|
||||
|
||||
|
@ -8,11 +8,11 @@ description: |-
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import RpmConvenienceScript from '!!raw-loader!./rpm-convenience.sh'
|
||||
import YumRepoScript from '!!raw-loader!./repo-yum.sh'
|
||||
import ZypperRepoScript from '!!raw-loader!./repo-zypper.sh'
|
||||
import YumInstallScript from '!!raw-loader!./install-yum.sh'
|
||||
import ZypperInstallScript from '!!raw-loader!./install-zypper.sh'
|
||||
import RpmConvenienceScript from '!!raw-loader!./examples/rpm-convenience.sh'
|
||||
import YumRepoScript from '!!raw-loader!./examples/repo-yum.sh'
|
||||
import ZypperRepoScript from '!!raw-loader!./examples/repo-zypper.sh'
|
||||
import YumInstallScript from '!!raw-loader!./examples/install-yum.sh'
|
||||
import ZypperInstallScript from '!!raw-loader!./examples/install-zypper.sh'
|
||||
import Buildkite from "./buildkite";
|
||||
|
||||
# Installing OpenTofu on RHEL, openSUSE, AlmaLinux and other RPM-based distributions
|
||||
|
@ -1,22 +1,27 @@
|
||||
#!/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
|
||||
|
||||
if [ -f /usr/bin/zypper ]; then
|
||||
zypper install -y sudo
|
||||
if [ "$1" = "--convenience" ]; then
|
||||
bash -ex rpm-convenience.sh
|
||||
bash -ex examples/rpm-convenience.sh
|
||||
else
|
||||
bash -ex repo-zypper.sh
|
||||
bash -ex install-zypper.sh
|
||||
bash -ex examples/repo-zypper.sh
|
||||
bash -ex examples/install-zypper.sh
|
||||
fi
|
||||
else
|
||||
yum install -y sudo
|
||||
if [ "$1" = "--convenience" ]; then
|
||||
bash -ex rpm-convenience.sh
|
||||
bash -ex examples/rpm-convenience.sh
|
||||
else
|
||||
bash -ex repo-yum.sh
|
||||
bash -ex install-yum.sh
|
||||
bash -ex examples/repo-yum.sh
|
||||
bash -ex examples/install-yum.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -8,13 +8,13 @@ description: |-
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import LinuxScript from '!!raw-loader!./standalone-install.sh'
|
||||
import WindowsScript from '!!raw-loader!./standalone-install.ps1'
|
||||
import VerifyChecksumPS1 from '!!raw-loader!./verify-checksum.ps1'
|
||||
import VerifyChecksumLinux from '!!raw-loader!./verify-checksum-linux.sh'
|
||||
import VerifyChecksumMacOS from '!!raw-loader!./verify-checksum-macos.sh'
|
||||
import VerifyCosignLinux from '!!raw-loader!./verify-cosign.sh'
|
||||
import VerifyCosignWindows from '!!raw-loader!./verify-cosign.ps1'
|
||||
import LinuxScript from '!!raw-loader!./examples/standalone-install.sh'
|
||||
import WindowsScript from '!!raw-loader!./examples/standalone-install.ps1'
|
||||
import VerifyChecksumPS1 from '!!raw-loader!./examples/verify-checksum.ps1'
|
||||
import VerifyChecksumLinux from '!!raw-loader!./examples/verify-checksum-linux.sh'
|
||||
import VerifyChecksumMacOS from '!!raw-loader!./examples/verify-checksum-macos.sh'
|
||||
import VerifyCosignLinux from '!!raw-loader!./examples/verify-cosign.sh'
|
||||
import VerifyCosignWindows from '!!raw-loader!./examples/verify-cosign.ps1'
|
||||
import Admonition from '@theme/Admonition';
|
||||
|
||||
# Installing OpenTofu from GitHub Releases
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user