Skip to content

Commit 7459ff8

Browse files
Update composer constraint in PHP README when baking a release (#589)
2 parents 09c6356 + 53331a9 commit 7459ff8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/Hello/Release/UpdateVersion.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ public function run(): void
136136
replacement: "packageVersion: \"^{$this->version}\"",
137137
subject: $contents,
138138
);
139+
} elseif ($this->sdk === 'php' && $filename === 'README.md') {
140+
// README installation instructions use the composer constraint (^X.Y.Z) from packageVersion
141+
$contents = str_replace($this->current_version, $this->version, $contents);
142+
$contents = preg_replace(
143+
pattern: '/(dropbox\/sign(?:": "|:)\^)[0-9]+\.[0-9]+\.[0-9]+/',
144+
replacement: "\${1}{$this->version}",
145+
subject: $contents,
146+
);
139147
} else {
140148
$contents = str_replace($this->current_version, $this->version, $contents);
141149
}

0 commit comments

Comments
 (0)