@followthecode/cli 1.2.18 → 1.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/linux-x64/ftc.cli +0 -0
- package/bin/osx-x64/ftc.cli +0 -0
- package/bin/win-x64/ftc.cli.exe +0 -0
- package/package.json +1 -1
- package/scripts/sync-version.js +16 -0
package/bin/linux-x64/ftc.cli
CHANGED
|
Binary file
|
package/bin/osx-x64/ftc.cli
CHANGED
|
Binary file
|
package/bin/win-x64/ftc.cli.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/scripts/sync-version.js
CHANGED
|
@@ -59,6 +59,21 @@ function updateCsprojVersion(version) {
|
|
|
59
59
|
console.log(`✅ Versão ${version} sincronizada no ftc.cli.csproj`);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
// Atualiza a versão no Program.cs
|
|
63
|
+
function updateProgramVersion(version) {
|
|
64
|
+
const programPath = path.join(__dirname, '..', 'Program.cs');
|
|
65
|
+
let content = fs.readFileSync(programPath, 'utf8');
|
|
66
|
+
|
|
67
|
+
// Atualiza a versão no Console.WriteLine do comando version
|
|
68
|
+
content = content.replace(
|
|
69
|
+
/Console\.WriteLine\(".*?"\)/g,
|
|
70
|
+
`Console.WriteLine("${version}")`
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
fs.writeFileSync(programPath, content);
|
|
74
|
+
console.log(`✅ Versão ${version} sincronizada no Program.cs`);
|
|
75
|
+
}
|
|
76
|
+
|
|
62
77
|
// Função principal
|
|
63
78
|
function main() {
|
|
64
79
|
try {
|
|
@@ -66,6 +81,7 @@ function main() {
|
|
|
66
81
|
console.log(`📦 Versão do package.json: ${version}`);
|
|
67
82
|
|
|
68
83
|
updateCsprojVersion(version);
|
|
84
|
+
updateProgramVersion(version);
|
|
69
85
|
|
|
70
86
|
console.log('🎉 Sincronização concluída!');
|
|
71
87
|
} catch (error) {
|