Skip to content

Commit

Permalink
chore(tauri): fix release file copy function
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Nov 12, 2023
1 parent 93cb05a commit bcc7dd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/tauri/release-prep/release-prep.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ if (fs.existsSync(releasePath)) {
fs.mkdirSync(releasePath);

function extractLatestChanges(changelog) {
const versionRegex =
/## \[(\d+\.\d+\.\d+)\].*?\n([\s\S]*?)(?=## \[|\n$)/;
const versionRegex = /## \[(\d+\.\d+\.\d+)\].*?\n([\s\S]*?)(?=## \[|\n$)/;
const linkRegex = /\(\[([^\]]+)\]\([^)]+\)\)/g;

const match = versionRegex.exec(changelog);
Expand Down Expand Up @@ -113,6 +112,7 @@ function addPlatformUpdater(
/**
* Recursively searches for files with the given glob pattern and copies them to the release folder.
* @param {string} searchPath - The starting directory to begin the search.
* @param {string} platform - The platform flat to append to the file name.
* @param {string} fileExtension - The file extension to search for.
*/
function addReleaseFiles(searchPath, platform, ...fileExtension) {
Expand All @@ -121,7 +121,7 @@ function addReleaseFiles(searchPath, platform, ...fileExtension) {
const entryPath = path.join(searchPath, entry.name);
if (entry.isDirectory()) {
// Recurse if entry is a directory
addReleaseFiles(entryPath, ...fileExtension);
addReleaseFiles(entryPath, platform, ...fileExtension);
} else if (
entry.isFile() &&
fileExtension.find((ext) => ext === path.extname(entry.name))
Expand Down

0 comments on commit bcc7dd2

Please sign in to comment.