Release Info Generation
Technical documentation for the generate-release-info script and build integration.
Release Process
For the complete release process (including changelog generation and release PRs), see Manual Release Process.
Overview
The generate-release-info script:
- Validates version consistency across
package.json,package-lock.json, andcom.github.IsmaelMartinez.teams_for_linux.appdata.xml - Extracts release notes from the
com.github.IsmaelMartinez.teams_for_linux.appdata.xmlfile - Generates a
release-info.jsonfile conforming to electron-builder's ReleaseInfo interface - Makes release info available for Linux publishing to GitHub
How It Works
Build Process Integration
- Pre-build: The
prebuildnpm script runsgenerate-release-infobefore any build - After Pack: The
afterPackhook in electron-builder generates fresh release info for Linux builds - Publishing: The
release-info.jsonfile is referenced by electron-builder'sreleaseNotesFilesetting for Linux publishing to GitHub
Generated Files
release-info.json(project root): Used for Linux publishing process
Usage
NPM Scripts
# Generate release info manually
npm run generate-release-info
# Build with automatic release info generation
npm run pack
npm run dist
Essential Commands
Quick Reference
npm run generate-release-info- Generate release information manuallynpm run pack- Development build with automatic release info generationnpm run dist- Production build with publishing support
File Structure
project/
├── package.json # Contains version and build config
├── package-lock.json # Version consistency check
├── com.github.IsmaelMartinez.teams_for_linux.appdata.xml # Source of release notes
├── release-info.json # Generated release info (dev)
├── scripts/
│ ├── generateReleaseInfo.js # Release info generator
│ └── afterpack.js # Build hook integration
Configuration
electron-builder Configuration (package.json)
{
"build": {
"linux": {
"publish": {
"provider": "github",
"releaseType": "draft",
"releaseInfo": {
"releaseNotesFile": "release-info.json"
}
}
},
"afterPack": "scripts/afterpack.js"
}
}
NPM Scripts (package.json)
{
"scripts": {
"generate-release-info": "node scripts/generateReleaseInfo.js",
"prebuild": "npm run generate-release-info"
}
}
Release Info Schema
The generated release-info.json follows electron-builder's ReleaseInfo interface:
{
"releaseName": "2.0.16",
"releaseNotes": "• Added feature A\n• Fixed bug B\n• Improved performance C",
"releaseDate": "2025-06-05"
}
Properties
| Property | Source | Description |
|---|---|---|
releaseName | package.json | Current version number |
releaseNotes | appdata.xml | Release notes from <description> section |
releaseDate | appdata.xml | Release date from date attribute |
Error Handling
The system performs validation and provides helpful error messages:
Common Errors
- Version Mismatch: If
package.jsonandpackage-lock.jsonversions don't match - Missing Release Entry: If no release entry exists for the current version in
appdata.xml - Empty Release Notes: If the release entry has no description
- Missing Files: If any required file is not found
Troubleshooting Steps
- Check version consistency across all three files
- Validate XML syntax in the appdata file
- Ensure release entry exists for the current version
- Verify file permissions for script execution
Examples
Manual Generation
cd /path/to/teams-for-linux
npm run generate-release-info
Successful Output:
✅ Version consistency check passed!
package.json: 2.0.16
package-lock.json: 2.0.16
com.github.IsmaelMartinez.teams_for_linux.appdata.xml: 2.0.16 (with release notes)
📋 Generated Release Info (electron-builder ReleaseInfo interface):
{
"releaseName": "2.0.16",
"releaseNotes": "• Added a reimplementation of the call events to revive the incoming call scripts\n• Added an incoming call toast just like the one from the discontinued Linux Teams App from Microsoft",
"releaseDate": "2025-06-05"
}
💾 Release info saved to: /path/to/teams-for-linux/release-info.json
Build Integration
npm run pack # Automatically runs prebuild and afterPack hooks
The release info will be automatically generated and bundled with the application.
CI/CD Integration
For automated releases in GitHub Actions:
- name: Generate Release Info
run: npm run generate-release-info
- name: Build Application
run: npm run dist
- name: Publish Release
run: npm run publish
Advanced Configuration
Custom Release Notes Format
You can customize the release notes extraction by modifying the generateReleaseInfo.js script to:
- Change formatting (HTML to Markdown conversion)
- Add additional metadata
- Include commit information
- Generate changelogs from git history
Multi-Platform Releases
For cross-platform releases, ensure:
- Version consistency across all platforms
- Platform-specific release notes if needed
- Proper artifact naming and organization
Related Documentation
- Manual Release Process - Complete release workflow
- ADR 005: AI-Powered Changelog Generation - Changelog automation
- IPC API - Integration with application features