diff --git a/404.html b/404.html index b1a8fbc..e7a9b34 100644 --- a/404.html +++ b/404.html @@ -159,7 +159,6 @@ {{> footer }} - diff --git a/about.html b/about.html index 76dd16b..08a384d 100644 --- a/about.html +++ b/about.html @@ -297,7 +297,6 @@ {{> footer }} - diff --git a/contact.html b/contact.html index 1e9c012..5b3f10b 100644 --- a/contact.html +++ b/contact.html @@ -114,7 +114,6 @@ {{> footer }} - diff --git a/faq.html b/faq.html index 770521a..29cb074 100644 --- a/faq.html +++ b/faq.html @@ -291,7 +291,6 @@ {{> footer }} - - diff --git a/licensing.html b/licensing.html index d0820db..f08af38 100644 --- a/licensing.html +++ b/licensing.html @@ -1139,7 +1139,6 @@ {{> footer }} - diff --git a/package.json b/package.json index b4e950e..935410d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "test:watch": "vitest watch", "build:docker": "vite build", "format": "prettier --write .", - "update-version": "node scripts/update-version.js", "release": "node scripts/release.js patch", "release:minor": "node scripts/release.js minor", "release:major": "node scripts/release.js major", diff --git a/pdf-converter.html b/pdf-converter.html index eb02e3d..455c63f 100644 --- a/pdf-converter.html +++ b/pdf-converter.html @@ -485,7 +485,6 @@ {{> footer }} - diff --git a/pdf-editor.html b/pdf-editor.html index 0e1a0ad..97379b1 100644 --- a/pdf-editor.html +++ b/pdf-editor.html @@ -354,7 +354,6 @@ {{> footer }} - diff --git a/pdf-merge-split.html b/pdf-merge-split.html index a250c11..c609b6e 100644 --- a/pdf-merge-split.html +++ b/pdf-merge-split.html @@ -312,7 +312,6 @@ {{> footer }} - diff --git a/pdf-security.html b/pdf-security.html index 58db29a..418df5a 100644 --- a/pdf-security.html +++ b/pdf-security.html @@ -289,7 +289,6 @@ {{> footer }} - diff --git a/privacy.html b/privacy.html index 78de50c..439ae4d 100644 --- a/privacy.html +++ b/privacy.html @@ -215,7 +215,6 @@ {{> footer }} - diff --git a/scripts/release.js b/scripts/release.js index de257ae..5824d20 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -75,26 +75,22 @@ function main() { const newVersion = updateVersion(type); console.log(`📦 Updated version to ${newVersion}`); - // 2. Update version in HTML files - console.log(`📝 Updating version in HTML files...`); - execSync('npm run update-version', { stdio: 'inherit' }); - - // 3. Add and commit changes - execSync('git add package.json *.html src/pages/*.html', { + // 2. Add and commit changes + execSync('git add package.json', { stdio: 'inherit', }); execSync(`git commit -m "Release v${newVersion}"`, { stdio: 'inherit' }); console.log(`💾 Committed version change`); - // 4. Create git tag + // 3. Create git tag const tagName = createGitTag(newVersion); - // 5. Build and package the distribution files + // 4. Build and package the distribution files console.log(`📦 Building and packaging distribution files...`); execSync('npm run package', { stdio: 'inherit' }); console.log(`📦 Distribution files packaged successfully`); - // 6. Push everything to main + // 5. Push everything to main console.log(`📤 Pushing to main...`); execSync('git push origin main', { stdio: 'inherit' }); execSync(`git push origin ${tagName}`, { stdio: 'inherit' }); diff --git a/scripts/update-version.js b/scripts/update-version.js deleted file mode 100644 index 5092ab6..0000000 --- a/scripts/update-version.js +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env node - -/** - * Script to update version numbers in HTML files from package.json - * Run this script whenever you need to sync HTML versions with package.json - */ - -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - -// Read version from package.json -const packageJson = JSON.parse( - fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8') -); -const version = packageJson.version; - -// HTML files to update -const htmlFiles = [ - 'index.html', - 'about.html', - 'contact.html', - 'faq.html', - 'privacy.html', - 'terms.html', - 'src/pages/add-stamps.html', - 'src/pages/bookmark.html', - 'src/pages/json-to-pdf.html', - 'src/pages/pdf-multi-tool.html', - 'src/pages/pdf-to-json.html', - 'src/pages/table-of-contents.html', -]; - -console.log(`Updating version to ${version} in HTML files...`); - -let updatedCount = 0; - -htmlFiles.forEach((file) => { - const filePath = path.join(__dirname, '..', file); - - if (!fs.existsSync(filePath)) { - console.log(`⚠️ Skipping ${file} (not found)`); - return; - } - - let content = fs.readFileSync(filePath, 'utf8'); - - // Replace version in X.X.X - const regex = /()[^<]+(<\/span>)/g; - const newContent = content.replace(regex, `$1${version}$2`); - - if (content !== newContent) { - fs.writeFileSync(filePath, newContent, 'utf8'); - console.log(`✓ Updated ${file}`); - updatedCount++; - } else { - console.log(`- ${file} (already up to date)`); - } -}); - -console.log(`\nDone! Updated ${updatedCount} file(s) to version ${version}`); diff --git a/simple-index.html b/simple-index.html index 58311f4..8925585 100644 --- a/simple-index.html +++ b/simple-index.html @@ -507,7 +507,8 @@ rights reserved.{{/if}}
- Version + Version + {{appVersion}}
@@ -517,7 +518,6 @@ -