Skip to content

Commit 7522bae

Browse files
committed
chore(build): rename dist files with new version
1 parent 897c18c commit 7522bae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/update-version-file.sh

+9
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,13 @@ done
2121
# Assign values in order of precedence: flags > env vars > defaults
2222
VERSION="${VERSION:-"${npm_package_version}"}"
2323

24+
# Update version that is referenced in the code
2425
echo "export const VERSION = '${VERSION}';" > electron/common/version.ts
26+
27+
# Rename dist files since they were built before the version was ticked
28+
for file in "$ROOT_DIR/dist"/*; do
29+
if [[ $file =~ (.*)-v[0-9]+\.[0-9]+\.[0-9]+-(.*) ]]; then
30+
new_file="${BASH_REMATCH[1]}-v${VERSION}-${BASH_REMATCH[2]}"
31+
mv "$file" "$new_file"
32+
fi
33+
done

0 commit comments

Comments
 (0)