Skip to content

Commit 653a6f9

Browse files
authored
fix(release): use dots instead of dashes in release assets name version (#1490)
Signed-off-by: Patrik Cyvoct <[email protected]>
1 parent fc4dfc2 commit 653a6f9

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ echo $PATH
6565
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
6666

6767
# Download the release from github
68-
curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v2.2.0/scw-2-2-0-darwin-x86_64"
68+
curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v2.2.0/scw-2.2.0-darwin-x86_64"
6969

7070
# Allow executing file as program
7171
chmod +x /usr/local/bin/scw
@@ -78,7 +78,7 @@ scw init
7878

7979
```bash
8080
# Download the release from github
81-
sudo curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v2.2.0/scw-2-2-0-linux-x86_64"
81+
sudo curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v2.2.0/scw-2.2.0-linux-x86_64"
8282

8383
# Allow executing file as program
8484
sudo chmod +x /usr/local/bin/scw
@@ -89,7 +89,7 @@ scw init
8989

9090
#### Windows
9191

92-
You can download the last release here: https://github.com/scaleway/scaleway-cli/releases/download/v2.2.0/scw-2-2-0-windows-x86_64.exe<br/>
92+
You can download the last release here: https://github.com/scaleway/scaleway-cli/releases/download/v2.2.0/scw-2.2.0-windows-x86_64.exe<br/>
9393
[This official guide](https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574%28v%3Doffice.14%29) explains how to add tools to your `PATH`.
9494

9595
<!-- TODO:
@@ -100,7 +100,7 @@ First, download [the `.deb` file](https://github.com/scaleway/scaleway-cli/relea
100100
101101
```bash
102102
export ARCH=amd64 # Can be 'amd64', 'arm', 'arm64' or 'i386'
103-
wget "https://github.com/scaleway/scaleway-cli/releases/download/v2.2.0/scw-v2-2-0-${ARCH}.deb" -O /tmp/scw.deb
103+
wget "https://github.com/scaleway/scaleway-cli/releases/download/v2.2.0/scw-v2.2.0-${ARCH}.deb" -O /tmp/scw.deb
104104
```
105105
106106
Then, run the installation and remove the `.deb` file:

scripts/release/release.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ async function main() {
149149
.filter(semver.valid)
150150
.sort((a, b) => semver.rcompare(semver.clean(a), semver.clean(b)))[0];
151151
const lastVersion = semver.clean(lastSemverTag);
152-
const lastVersionWithDash = lastVersion.replace(/\./g, "-");
153152
console.log(` Last found release tag was ${lastSemverTag}`.green);
154153

155154
console.log("Listing commit since last release".blue);
@@ -162,7 +161,6 @@ async function main() {
162161
if (!newVersion) {
163162
throw new Error(`invalid version`);
164163
}
165-
const newVersionWithDash = newVersion.replace(/\./g, "-");
166164

167165
//
168166
// Creating release commit
@@ -173,7 +171,6 @@ async function main() {
173171
changelog.body = externalEditor.edit(changelog.body);
174172

175173
replaceInFile(README_PATH, lastVersion, newVersion);
176-
replaceInFile(README_PATH, lastVersionWithDash, newVersionWithDash);
177174
replaceInFile(CHANGELOG_PATH, "# Changelog", `# Changelog\n\n${changelog.header}\n\n${changelog.body}\n`);
178175
replaceInFile(GO_VERSION_PATH, /Version = "[^"]*"/, `Version = "v${newVersion}"`);
179176
console.log(` Update success`.green);
@@ -217,11 +214,11 @@ async function main() {
217214

218215
console.log(" attach assets to the release".gray);
219216
const releaseAssets = [
220-
`scw-${newVersionWithDash}-darwin-x86_64`,
221-
`scw-${newVersionWithDash}-linux-x86_64`,
222-
`scw-${newVersionWithDash}-linux-386`,
223-
`scw-${newVersionWithDash}-windows-x86_64.exe`,
224-
`scw-${newVersionWithDash}-windows-386.exe`,
217+
`scw-${newVersion}-darwin-x86_64`,
218+
`scw-${newVersion}-linux-x86_64`,
219+
`scw-${newVersion}-linux-386`,
220+
`scw-${newVersion}-windows-x86_64.exe`,
221+
`scw-${newVersion}-windows-386.exe`,
225222
`SHA256SUMS`,
226223
];
227224
await Promise.all(releaseAssets.map((assetName) => {

0 commit comments

Comments
 (0)