mirror of
https://github.com/hashicorp/terraform.git
synced 2026-02-03 20:50:59 -05:00
setup changie
This commit is contained in:
parent
2e236506d9
commit
2a0ee07d03
11 changed files with 176 additions and 55 deletions
0
.changes/1.11.0.md
Normal file
0
.changes/1.11.0.md
Normal file
11
.changes/experiments.md
Normal file
11
.changes/experiments.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
EXPERIMENTS:
|
||||
|
||||
Experiments are only enabled in alpha releases of Terraform CLI. The following features are not yet available in stable releases.
|
||||
|
||||
- `terraform test` accepts a new option `-junit-xml=FILENAME`. If specified, and if the test configuration is valid enough to begin executing, then Terraform writes a JUnit XML test result report to the given filename, describing similar information as included in the normal test output. ([#34291](https://github.com/hashicorp/terraform/issues/34291))
|
||||
- The new command `terraform rpcapi` exposes some Terraform Core functionality through an RPC interface compatible with [`go-plugin`](https://github.com/hashicorp/go-plugin). The exact RPC API exposed here is currently subject to change at any time, because it's here primarily as a vehicle to support the [Terraform Stacks](https://www.hashicorp.com/blog/terraform-stacks-explained) private preview and so will be broken if necessary to respond to feedback from private preview participants, or possibly for other reasons. Do not use this mechanism yet outside of Terraform Stacks private preview.
|
||||
- The experimental "deferred actions" feature, enabled by passing the `-allow-deferral` option to `terraform plan`, permits `count` and `for_each` arguments in `module`, `resource`, and `data` blocks to have unknown values and allows providers to react more flexibly to unknown values. This experiment is under active development, and so it's not yet useful to participate in this experiment
|
||||
|
||||
## Previous Releases
|
||||
|
||||
For information on prior major and minor releases, refer to their changelogs:
|
||||
16
.changes/previous-releases.md
Normal file
16
.changes/previous-releases.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
- [v1.10](https://github.com/hashicorp/terraform/blob/v1.10/CHANGELOG.md)
|
||||
- [v1.9](https://github.com/hashicorp/terraform/blob/v1.9/CHANGELOG.md)
|
||||
- [v1.8](https://github.com/hashicorp/terraform/blob/v1.8/CHANGELOG.md)
|
||||
- [v1.7](https://github.com/hashicorp/terraform/blob/v1.7/CHANGELOG.md)
|
||||
- [v1.6](https://github.com/hashicorp/terraform/blob/v1.6/CHANGELOG.md)
|
||||
- [v1.5](https://github.com/hashicorp/terraform/blob/v1.5/CHANGELOG.md)
|
||||
- [v1.4](https://github.com/hashicorp/terraform/blob/v1.4/CHANGELOG.md)
|
||||
- [v1.3](https://github.com/hashicorp/terraform/blob/v1.3/CHANGELOG.md)
|
||||
- [v1.2](https://github.com/hashicorp/terraform/blob/v1.2/CHANGELOG.md)
|
||||
- [v1.1](https://github.com/hashicorp/terraform/blob/v1.1/CHANGELOG.md)
|
||||
- [v1.0](https://github.com/hashicorp/terraform/blob/v1.0/CHANGELOG.md)
|
||||
- [v0.15](https://github.com/hashicorp/terraform/blob/v0.15/CHANGELOG.md)
|
||||
- [v0.14](https://github.com/hashicorp/terraform/blob/v0.14/CHANGELOG.md)
|
||||
- [v0.13](https://github.com/hashicorp/terraform/blob/v0.13/CHANGELOG.md)
|
||||
- [v0.12](https://github.com/hashicorp/terraform/blob/v0.12/CHANGELOG.md)
|
||||
- [v0.11 and earlier](https://github.com/hashicorp/terraform/blob/v0.11/CHANGELOG.md)
|
||||
0
.changes/unreleased/.gitkeep
Normal file
0
.changes/unreleased/.gitkeep
Normal file
5
.changes/unreleased/ENHANCEMENTS-20250102-130808.yaml
Normal file
5
.changes/unreleased/ENHANCEMENTS-20250102-130808.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
kind: ENHANCEMENTS
|
||||
body: "`init`: Provider installation will utilise credentials configured in a `.netrc` file for the download and shasum URLs returned by provider registries."
|
||||
time: 2025-01-02T13:00:22.419624+01:00
|
||||
custom:
|
||||
Issue: "35843"
|
||||
5
.changes/unreleased/ENHANCEMENTS-20250102-131022.yaml
Normal file
5
.changes/unreleased/ENHANCEMENTS-20250102-131022.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
kind: ENHANCEMENTS
|
||||
body: "New command `modules -json`: Displays a full list of all installed modules in a working directory, including whether each module is currently referenced by the working directory's configuration."
|
||||
time: 2025-01-02T13:10:22.419624+01:00
|
||||
custom:
|
||||
Issue: "35884"
|
||||
33
.changie.yaml
Normal file
33
.changie.yaml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
|
||||
changesDir: .changes
|
||||
unreleasedDir: unreleased
|
||||
versionFooterPath: version_footer.tpl.md
|
||||
changelogPath: CHANGELOG.md
|
||||
versionExt: md
|
||||
versionFormat: '## {{.Version}} ({{.Time.Format "January 2, 2006"}})'
|
||||
kindFormat: "{{.Kind}}:"
|
||||
changeFormat: "* {{.Body}} {{- if .Custom.Issue }} ([#{{.Custom.Issue}}](https://github.com/hashicorp/terraform/issues/{{.Custom.Issue}})){{- end}}"
|
||||
custom:
|
||||
- key: Issue
|
||||
label: Issue/PR Number
|
||||
type: int
|
||||
minInt: 1
|
||||
kinds:
|
||||
- label: NEW FEATURES
|
||||
- label: ENHANCEMENTS
|
||||
- label: BUG FIXES
|
||||
- label: NOTES
|
||||
- label: UPGRADE NOTES
|
||||
- label: BREAKING CHANGES
|
||||
newlines:
|
||||
afterChangelogHeader: 0
|
||||
beforeKind: 1
|
||||
afterKind: 1
|
||||
afterChange: 1
|
||||
afterVersion: 1
|
||||
beforeChangelogVersion: 0
|
||||
endOfVersion: 2
|
||||
envPrefix: CHANGIE_
|
||||
|
|
@ -13,6 +13,7 @@ project {
|
|||
"**/*.pb.go",
|
||||
"**/*_string.go",
|
||||
"**/mock*.go",
|
||||
".changes/unreleased/**",
|
||||
# these directories have their own copywrite config
|
||||
"docs/plugin-protocol/**",
|
||||
"internal/tfplugin*/**"
|
||||
|
|
|
|||
20
.github/pull_request_template.md
vendored
20
.github/pull_request_template.md
vendored
|
|
@ -33,24 +33,14 @@ label to enable the backport bot.
|
|||
|
||||
1.11.x
|
||||
|
||||
## Draft CHANGELOG entry
|
||||
## CHANGELOG entry
|
||||
|
||||
<!--
|
||||
|
||||
Choose a category, delete the others:
|
||||
If your change is user-facing, add a short description in a changelog entry.
|
||||
You can use `npx changie new` to create a new changelog entry or manually create a new file in the .changes/unreleasd directory.
|
||||
|
||||
-->
|
||||
|
||||
### NEW FEATURES | UPGRADE NOTES | ENHANCEMENTS | BUG FIXES | EXPERIMENTS
|
||||
|
||||
<!--
|
||||
|
||||
Write a short description of the user-facing change. Examples:
|
||||
|
||||
- `terraform show -json`: Fixed crash with sensitive set values.
|
||||
- When rendering a diff, Terraform now quotes the name of any object attribute whose string representation is not a valid identifier.
|
||||
- The local token configuration in the cloud and remote backend now has higher priority than a token specified in a credentials block in the CLI configuration.
|
||||
|
||||
-->
|
||||
|
||||
-
|
||||
- [ ] This change is user-facing and I added a changelog entry.
|
||||
- [ ] This change is not user-facing.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
## 1.11.0-alpha20250107 (January 7, 2025)
|
||||
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
- `init`: Provider installation will utilise credentials configured in a `.netrc` file for the download and shasum URLs returned by provider registries. ([https://github.com/hashicorp/terraform/pull/35843](35843))
|
||||
- New command `modules -json`: Displays a full list of all installed modules in a working directory, including whether each module is currently referenced by the working directory's configuration. ([#35884](https://github.com/hashicorp/terraform/pull/35884), [#36062](https://github.com/hashicorp/terraform/pull/36062))
|
||||
* `init`: Provider installation will utilise credentials configured in a `.netrc` file for the download and shasum URLs returned by provider registries. ([#35843](https://github.com/hashicorp/terraform/issues/35843))
|
||||
|
||||
* New command `modules -json`: Displays a full list of all installed modules in a working directory, including whether each module is currently referenced by the working directory's configuration. ([#35884](https://github.com/hashicorp/terraform/issues/35884))
|
||||
|
||||
|
||||
EXPERIMENTS:
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
set -uo pipefail
|
||||
|
||||
CHANGIE_VERSION="${CHANGIE_VERSION:-1.21.0}"
|
||||
|
||||
function usage {
|
||||
cat <<-'EOF'
|
||||
Usage: ./changelog.sh <command> [<options>]
|
||||
|
|
@ -13,59 +15,114 @@ Description:
|
|||
This script will update CHANGELOG.md with the given version and date.
|
||||
|
||||
Commands:
|
||||
prepare <version> <date>
|
||||
prepare updates the first line in the CHANGELOG.md file with the
|
||||
given version and date.
|
||||
generate <release-type>
|
||||
generate will create a new section in the CHANGELOG.md file for the given release
|
||||
type. The release type should be one of "dev", "alpha", "release", or "patch".
|
||||
`dev`: will update the changelog with the latest unreleased changes.
|
||||
`alpha`: will generate a new section with an alpha version for today.
|
||||
`release`: will make the initial minor release for this branch.
|
||||
`patch`: will generate a new patch release
|
||||
|
||||
|
||||
./changelog.sh prepare 1.0.0 "November 1, 2021"
|
||||
|
||||
cleanup <released-version> <next-version>
|
||||
cleanup prepends a new section to the CHANGELOG.md file with the given
|
||||
version and (Unreleased) as the date. If the released version contains a
|
||||
pre-release tag, the next version will replace the top line instead of
|
||||
inserting a new section.
|
||||
nextminor
|
||||
Run this to get a new release branch for the next minor version.
|
||||
EOF
|
||||
}
|
||||
|
||||
function prepare {
|
||||
VERSION="${1:-}"
|
||||
DATE="${2:-}"
|
||||
function generate {
|
||||
RELEASE_TYPE="${1:-}"
|
||||
|
||||
if [[ -z "$RELEASE_TYPE" ]]; then
|
||||
echo "missing <release-type> argument"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$RELEASE_TYPE" in
|
||||
|
||||
dev)
|
||||
LATEST_VERSION=$(npx -y changie@$CHANGIE_VERSION latest -r --skip-prereleases)
|
||||
COMPLETE_VERSION="$LATEST_VERSION-dev"
|
||||
|
||||
if [[ -z "$VERSION" || -z "$DATE" ]]; then
|
||||
echo "missing at least one of [<version>, <date>] arguments"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
npx -y changie@$CHANGIE_VERSION merge -u "## $LATEST_VERSION (Unreleased)"
|
||||
|
||||
# If we have no changes yet, the changelog is empty now, so we need to add a header
|
||||
if [[ ! -s CHANGELOG.md ]]; then
|
||||
echo "## $LATEST_VERSION (Unreleased)" > CHANGELOG.md
|
||||
echo "" >> CHANGELOG.md
|
||||
fi
|
||||
;;
|
||||
|
||||
sed -i '' -e "1s/.*/## $VERSION ($DATE)/" CHANGELOG.md
|
||||
alpha)
|
||||
PRERELEASE_VERSION=$(date +"alpha%Y%m%d")
|
||||
LATEST_VERSION=$(npx -y changie@$CHANGIE_VERSION latest -r --skip-prereleases)
|
||||
HUMAN_DATE=$(date +"%B %d, %Y") # Date in Janurary 1st, 2022 format
|
||||
COMPLETE_VERSION="$LATEST_VERSION-$PRERELEASE_VERSION"
|
||||
|
||||
npx -y changie@$CHANGIE_VERSION merge -u "## $COMPLETE_VERSION ($HUMAN_DATE)"
|
||||
;;
|
||||
patch)
|
||||
COMPLETE_VERSION=$(npx -y changie@$CHANGIE_VERSION next patch)
|
||||
COMPLETE_VERSION=${COMPLETE_VERSION:1} # remove the v prefix
|
||||
npx -y changie@$CHANGIE_VERSION batch patch
|
||||
npx -y changie@$CHANGIE_VERSION merge
|
||||
;;
|
||||
|
||||
release)
|
||||
# This is the first release of the branch, releasing the new minor version
|
||||
COMPLETE_VERSION=$(npx -y changie@$CHANGIE_VERSION latest -r --skip-prereleases)
|
||||
# We currently keep a file that looks like this release to ensure the alphas and dev versions are generated correctly
|
||||
rm ./.changes/$COMPLETE_VERSION.md
|
||||
|
||||
npx -y changie@$CHANGIE_VERSION batch $COMPLETE_VERSION
|
||||
npx -y changie@$CHANGIE_VERSION merge
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "invalid <release-type> argument"
|
||||
usage
|
||||
exit 1
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set version/VERSION to the to be released version
|
||||
echo "$COMPLETE_VERSION" > version/VERSION
|
||||
|
||||
# Add footer to the changelog
|
||||
cat ./.changes/experiments.md >> CHANGELOG.md
|
||||
echo "" >> CHANGELOG.md
|
||||
cat ./.changes/previous-releases.md >> CHANGELOG.md
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
RELEASED_VERSION="${1:-}"
|
||||
NEXT_VERSION="${2:-}"
|
||||
function nextminor {
|
||||
LATEST_VERSION=$(npx -y changie@$CHANGIE_VERSION latest -r --skip-prereleases)
|
||||
LATEST_VERSION=${LATEST_VERSION%.*} # Remove the patch version
|
||||
CURRENT_FILE_CONTENT=$(cat ./.changes/previous-releases.md)
|
||||
# Prepend the latest version to the previous releases
|
||||
echo "- [v$LATEST_VERSION](https://github.com/hashicorp/terraform/blob/v$LATEST_VERSION/CHANGELOG.md)" > ./.changes/previous-releases.md
|
||||
echo "$CURRENT_FILE_CONTENT" >> ./.changes/previous-releases.md
|
||||
|
||||
if [[ -z "$RELEASED_VERSION" || -z "$NEXT_VERSION" ]]; then
|
||||
echo "missing at least one of [<released-version>, <next-version>] arguments"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$RELEASED_VERSION" == *-* ]]; then
|
||||
# then we have a pre-release version, so we should replace the top line
|
||||
sed -i '' -e "1s/.*/## $NEXT_VERSION (Unreleased)/" CHANGELOG.md
|
||||
else
|
||||
sed -i '' -e "1s/^/## $NEXT_VERSION (Unreleased)\n\n/" CHANGELOG.md
|
||||
fi
|
||||
NEXT_VERSION=$(npx -y changie@$CHANGIE_VERSION next minor)
|
||||
# Remove all existing per-release changelogs
|
||||
rm ./.changes/*.*.*.md
|
||||
# Remove all unreleased changes
|
||||
rm ./.changes/unreleased/*.yaml
|
||||
# Create a new empty version file for the next minor version
|
||||
touch ./.changes/$NEXT_VERSION.md
|
||||
|
||||
generate "dev"
|
||||
}
|
||||
|
||||
function main {
|
||||
case "$1" in
|
||||
prepare)
|
||||
prepare "${@:2}"
|
||||
generate)
|
||||
generate "${@:2}"
|
||||
|
||||
;;
|
||||
cleanup)
|
||||
cleanup "${@:2}"
|
||||
nextminor)
|
||||
nextminor "${@:2}"
|
||||
|
||||
;;
|
||||
*)
|
||||
|
|
|
|||
Loading…
Reference in a new issue