-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from newrelic/release/v0.0.2
Release/v0.0.2
- Loading branch information
Showing
10 changed files
with
233 additions
and
64 deletions.
There are no files selected for viewing
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,42 @@ | ||
{{ if .Versions -}} | ||
<a name="unreleased"></a> | ||
## [Unreleased] | ||
|
||
{{ if .Unreleased.CommitGroups -}} | ||
{{ range .Unreleased.CommitGroups -}} | ||
### {{ .Title }} | ||
{{ range .Commits -}} | ||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} | ||
{{ end }} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end -}} | ||
|
||
{{ range .Versions }} | ||
<a name="{{ .Tag.Name }}"></a> | ||
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} | ||
{{ range .CommitGroups -}} | ||
### {{ .Title }} | ||
{{ range .Commits -}} | ||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} | ||
{{ end }} | ||
{{ end -}} | ||
|
||
{{- if .NoteGroups -}} | ||
{{ range .NoteGroups -}} | ||
### {{ .Title }} | ||
{{ range .Notes }} | ||
{{ .Body }} | ||
{{ end }} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end -}} | ||
|
||
{{- if .Versions }} | ||
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD | ||
{{ range .Versions -}} | ||
{{ if .Tag.Previous -}} | ||
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end -}} |
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,10 @@ | ||
style: github | ||
template: CHANGELOG.tpl.md | ||
info: | ||
title: CHANGELOG | ||
repository_url: https://github.com/newrelic/terraform-newrelic-apm | ||
options: | ||
header: | ||
pattern: "^(.*)$" | ||
pattern_maps: | ||
- Subject |
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,10 @@ | ||
repos: | ||
- repo: git://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.26.0 | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_docs | ||
- repo: git://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.5.0 | ||
hooks: | ||
- id: check-merge-conflict |
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,12 @@ | ||
<a name="unreleased"></a> | ||
## [Unreleased] | ||
|
||
|
||
<a name="v0.0.2"></a> | ||
## [v0.0.2] - 2020-03-10 | ||
|
||
<a name="v0.0.1"></a> | ||
## v0.0.1 - 2020-03-10 | ||
|
||
[Unreleased]: https://github.com/newrelic/terraform-newrelic-apm/compare/v0.0.2...HEAD | ||
[v0.0.2]: https://github.com/newrelic/terraform-newrelic-apm/compare/v0.0.1...v0.0.2 |
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,12 @@ | ||
############################# | ||
# Global vars | ||
############################# | ||
PROJECT_NAME := $(shell basename $(shell pwd)) | ||
|
||
RELEASE_SCRIPT ?= ./scripts/release.sh | ||
|
||
release: | ||
@echo "=== $(PROJECT_NAME) === [ release ]: Generating release." | ||
$(RELEASE_SCRIPT) $(version) | ||
|
||
.PHONY: release |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
output "policy_id" { | ||
value = newrelic_alert_policy.policy.id | ||
value = newrelic_alert_policy.policy.id | ||
} | ||
|
||
output "apdex_condition_id" { | ||
value = newrelic_nrql_alert_condition.apdex_condition.id | ||
value = newrelic_nrql_alert_condition.apdex_condition.id | ||
} | ||
|
||
output "error_rate_condition_id" { | ||
value = newrelic_nrql_alert_condition.error_rate_condition.id | ||
value = newrelic_nrql_alert_condition.error_rate_condition.id | ||
} | ||
|
||
output "synthetics_monitor_id" { | ||
value = length(newrelic_synthetics_monitor.synthetics_monitor) > 0 ? newrelic_synthetics_monitor.synthetics_monitor[0].id : null | ||
value = length(newrelic_synthetics_monitor.synthetics_monitor) > 0 ? newrelic_synthetics_monitor.synthetics_monitor[0].id : null | ||
} | ||
|
||
output "synthetics_condition_id" { | ||
value = length(newrelic_nrql_alert_condition.synthetics_condition) > 0 ? newrelic_nrql_alert_condition.synthetics_condition[0].id : null | ||
value = length(newrelic_nrql_alert_condition.synthetics_condition) > 0 ? newrelic_nrql_alert_condition.synthetics_condition[0].id : null | ||
} | ||
|
||
output "reponse_time_condition_id" { | ||
value = length(newrelic_nrql_alert_condition.response_time_condition) > 0 ? newrelic_nrql_alert_condition.response_time_condition[0].id : null | ||
value = length(newrelic_nrql_alert_condition.response_time_condition) > 0 ? newrelic_nrql_alert_condition.response_time_condition[0].id : null | ||
} |
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,38 @@ | ||
#!/bin/bash | ||
|
||
COLOR_RED='\033[0;31m' | ||
COLOR_NONE='\033[0m' | ||
CURRENT_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ $CURRENT_GIT_BRANCH != 'master' ]; then | ||
printf "\n" | ||
printf "${COLOR_RED} Error: The release.sh script must be run while on the master branch. \n ${COLOR_NONE}" | ||
printf "\n" | ||
|
||
exit 1 | ||
fi | ||
|
||
if [ $# -ne 1 ]; then | ||
printf "\n" | ||
printf "${COLOR_RED} Error: Release version argument required. \n\n ${COLOR_NONE}" | ||
printf " Example: \n\n ./tools/release.sh 0.9.0 \n\n" | ||
printf " Example (make): \n\n make release version=0.9.0 \n" | ||
printf "\n" | ||
|
||
exit 1 | ||
fi | ||
|
||
RELEASE_VERSION=$1 | ||
GIT_USER=$(git config user.email) | ||
|
||
echo "Generating release for v${RELEASE_VERSION} using system user git user ${GIT_USER}" | ||
|
||
git checkout -b release/v${RELEASE_VERSION} | ||
|
||
# Auto-generate CHANGELOG updates | ||
git-chglog --next-tag v${RELEASE_VERSION} -o CHANGELOG.md | ||
|
||
# Commit CHANGELOG updates | ||
git add CHANGELOG.md internal/version/version.go | ||
git commit -m "chore(changelog): Update CHANGELOG for v${RELEASE_VERSION}" | ||
git push origin release/v${RELEASE_VERSION} |
Oops, something went wrong.