release-please 15.12.0 → 15.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [15.13.0](https://github.com/googleapis/release-please/compare/v15.12.0...v15.13.0) (2023-08-18)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Adds metadata versioning for terraform modules ([#2041](https://github.com/googleapis/release-please/issues/2041)) ([49b33c7](https://github.com/googleapis/release-please/commit/49b33c73b2571699ad8362f8b6b934154a6ce375))
|
|
13
|
+
|
|
7
14
|
## [15.12.0](https://github.com/googleapis/release-please/compare/v15.11.2...v15.12.0) (2023-07-11)
|
|
8
15
|
|
|
9
16
|
|
|
@@ -19,6 +19,7 @@ const changelog_1 = require("../updaters/changelog");
|
|
|
19
19
|
// Terraform specific.
|
|
20
20
|
const readme_1 = require("../updaters/terraform/readme");
|
|
21
21
|
const module_version_1 = require("../updaters/terraform/module-version");
|
|
22
|
+
const metadata_version_1 = require("../updaters/terraform/metadata-version");
|
|
22
23
|
const base_1 = require("./base");
|
|
23
24
|
const version_1 = require("../version");
|
|
24
25
|
class TerraformModule extends base_1.BaseStrategy {
|
|
@@ -67,6 +68,17 @@ class TerraformModule extends base_1.BaseStrategy {
|
|
|
67
68
|
}),
|
|
68
69
|
});
|
|
69
70
|
});
|
|
71
|
+
// Update metadata.yaml to current candidate version.
|
|
72
|
+
const metadataFiles = await this.github.findFilesByFilenameAndRef('metadata.yaml', this.targetBranch, this.path);
|
|
73
|
+
metadataFiles.forEach(path => {
|
|
74
|
+
updates.push({
|
|
75
|
+
path: this.addPath(path),
|
|
76
|
+
createIfMissing: false,
|
|
77
|
+
updater: new metadata_version_1.MetadataVersion({
|
|
78
|
+
version,
|
|
79
|
+
}),
|
|
80
|
+
});
|
|
81
|
+
});
|
|
70
82
|
return updates;
|
|
71
83
|
}
|
|
72
84
|
initialReleaseVersion() {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Logger } from '../../util/logger';
|
|
2
|
+
import { DefaultUpdater } from '../default';
|
|
3
|
+
/**
|
|
4
|
+
* Updates a Terraform metadata.yaml or metadata.display.yaml file(s).
|
|
5
|
+
*/
|
|
6
|
+
export declare class MetadataVersion extends DefaultUpdater {
|
|
7
|
+
/**
|
|
8
|
+
* Given initial file contents, return updated contents.
|
|
9
|
+
* @param {string} content The initial content
|
|
10
|
+
* @returns {string} The updated content
|
|
11
|
+
*/
|
|
12
|
+
updateContent(content: string, logger?: Logger): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2023 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.MetadataVersion = void 0;
|
|
17
|
+
const logger_1 = require("../../util/logger");
|
|
18
|
+
const default_1 = require("../default");
|
|
19
|
+
/**
|
|
20
|
+
* Updates a Terraform metadata.yaml or metadata.display.yaml file(s).
|
|
21
|
+
*/
|
|
22
|
+
class MetadataVersion extends default_1.DefaultUpdater {
|
|
23
|
+
/**
|
|
24
|
+
* Given initial file contents, return updated contents.
|
|
25
|
+
* @param {string} content The initial content
|
|
26
|
+
* @returns {string} The updated content
|
|
27
|
+
*/
|
|
28
|
+
updateContent(content, logger = logger_1.logger) {
|
|
29
|
+
const oldVersion = content.match(/version: [0-9]+\.[0-9]+\.[0-9]+(-\w+)?/);
|
|
30
|
+
if (oldVersion) {
|
|
31
|
+
logger.info(`updating from ${oldVersion} to v${this.version}`);
|
|
32
|
+
}
|
|
33
|
+
return content.replace(/version: [0-9]+\.[0-9]+\.[0-9]+(-\w+)?/g, `version: ${this.version}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.MetadataVersion = MetadataVersion;
|
|
37
|
+
//# sourceMappingURL=metadata-version.js.map
|
package/package.json
CHANGED