-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4e1e60
commit 653e915
Showing
10 changed files
with
172 additions
and
59 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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 | ||
afterKind: 1 | ||
afterVersion: 1 | ||
beforeChangelogVersion: 0 | ||
endOfVersion: 2 | ||
envPrefix: CHANGIE_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ | |
|
||
|
||
set -uo pipefail | ||
set -x | ||
|
||
# TODO: Make all paths relative to the script location | ||
|
||
function usage { | ||
cat <<-'EOF' | ||
|
@@ -13,59 +16,115 @@ 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. | ||
./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. | ||
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 | ||
nextminor | ||
Run this to get a new release branch for the next minor version. | ||
EOF | ||
} | ||
|
||
function prepare { | ||
VERSION="${1:-}" | ||
DATE="${2:-}" | ||
|
||
if [[ -z "$VERSION" || -z "$DATE" ]]; then | ||
echo "missing at least one of [<version>, <date>] arguments" | ||
usage | ||
exit 1 | ||
fi | ||
|
||
sed -i '' -e "1s/.*/## $VERSION ($DATE)/" CHANGELOG.md | ||
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 [email protected] latest -r --skip-prereleases) | ||
COMPLETE_VERSION="$LATEST_VERSION-dev" | ||
|
||
echo "LASTEST_VERSION: $LATEST_VERSION" | ||
|
||
npx -y [email protected] 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 | ||
;; | ||
|
||
alpha) | ||
PRERELEASE_VERSION=$(date +"alpha%Y%m%d") | ||
LATEST_VERSION=$(npx -y [email protected] latest -r --skip-prereleases) | ||
HUMAN_DATE=$(date +"%B %d, %Y") # Date in Janurary 1st, 2022 format | ||
COMPLETE_VERSION="$LATEST_VERSION-$PRERELEASE_VERSION" | ||
|
||
npx -y [email protected] merge -u "## $COMPLETE_VERSION ($HUMAN_DATE)" | ||
;; | ||
patch) | ||
COMPLETE_VERSION=$(npx -y [email protected] next patch) | ||
COMPLETE_VERSION=${COMPLETE_VERSION:1} # remove the v prefix | ||
npx -y [email protected] batch patch | ||
npx -y [email protected] merge | ||
;; | ||
|
||
release) | ||
# This is the first release of the branch, releasing the new minor version | ||
COMPLETE_VERSION=$(npx -y [email protected] 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 [email protected] batch $COMPLETE_VERSION | ||
npx -y [email protected] 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:-}" | ||
|
||
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 | ||
function nextminor { | ||
LATEST_VERSION=$(npx -y [email protected] 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 | ||
|
||
NEXT_VERSION=$(npx -y [email protected] 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}" | ||
|
||
;; | ||
*) | ||
|