mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-13 13:48:26 +00:00
fix: Allow slash icon with double release
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/* eslint-disable no-restricted-syntax, no-await-in-loop */
|
||||
import { simpleGit } from 'simple-git';
|
||||
import semver from 'semver';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { simpleGit } from 'simple-git';
|
||||
import semver from 'semver';
|
||||
import { readSvgDirectory } from './helpers.mjs';
|
||||
|
||||
const DATE_OF_FORK = '2020-06-08T16:39:52+0100';
|
||||
@@ -15,6 +15,8 @@ const iconJsonFiles = readSvgDirectory(ICONS_DIR, '.json');
|
||||
const location = path.resolve(currentDir, '.vitepress/data', 'releaseMetaData.json');
|
||||
const releaseMetaDataDirectory = path.resolve(currentDir, '.vitepress/data', 'releaseMetadata');
|
||||
|
||||
const allowedIconNameWithDoubleRelease = ['slash'];
|
||||
|
||||
if (fs.existsSync(location)) {
|
||||
fs.unlinkSync(location);
|
||||
}
|
||||
@@ -107,7 +109,10 @@ comparisons.forEach(({ tag, iconFiles, date } = {}) => {
|
||||
}
|
||||
|
||||
if (status === 'A') {
|
||||
if ('changedRelease' in newReleaseMetaData[iconName]) {
|
||||
if (
|
||||
'changedRelease' in newReleaseMetaData[iconName] &&
|
||||
!allowedIconNameWithDoubleRelease.includes(iconName)
|
||||
) {
|
||||
throw new Error(`Icon '${iconName}' has already changedRelease set.`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user