Millora de la sincronització automàtica de versions natives a partir de package.json - #206
Merged
Merged
Conversation
…de package.json Fins ara, la versió als projectes natius (iOS i Android) es gestionava amb capacitor-sync-version (sense mantenir), que actualitzava Info.plist (ignorada per Xcode en favor de project.pbxproj) i escrivia CFBundleVersion com a un string de versió enlloc d'un enter. S'ha afegit un script propi a scripts/set-native-version.mjs, que actualitza directament project.pbxproj (a iOS) i app.properties (a Android) amb la versió de package.json i un build number (versionCode a Android, CURRENT_PROJECT_VERSION a iOS) calculat com ho feia capacitor-sync-version, per compatibilitat amb el que ja hi ha publicat a la Play Console: major×1.000.000 + minor×1.000 + patch. Eliminada la dependència a capacitor-sync-version integrat l'script per execuatar-se cada vegada que es fa un build natiu (cap:build) i es canvia versió (postversion).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
capacitor-sync-version(sense manteniment), que actualitzavaInfo.plist(ignorada per Xcode) i escriviaCFBundleVersioncom a string en lloc d'enter.scripts/set-native-version.mjs, que actualitza directamentproject.pbxproj(iOS) iapp.properties(Android) amb la versió depackage.json.versionCodea Android,CURRENT_PROJECT_VERSIONa iOS) es calcula commajor×1.000.000 + minor×1.000 + patch, consistent amb el valor publicat a Play Console.npm run cap:build(build natiu) inpm version(canvi de versió).Fins ara, la versió als projectes natius (iOS i Android) es gestionava amb capacitor-sync-version (sense mantenir), que actualitzava Info.plist (ignorada per Xcode en favor de project.pbxproj) i escrivia CFBundleVersion com a un string de versió enlloc d'un enter.
S'ha afegit un script propi a scripts/set-native-version.mjs, que actualitza directament project.pbxproj (a iOS) i app.properties (a Android) amb la versió de package.json i un build number (versionCode a Android, CURRENT_PROJECT_VERSION a iOS) calculat com ho feia capacitor-sync-version, per compatibilitat amb el que ja hi ha publicat a la Play Console: major×1.000.000 + minor×1.000 + patch.
Eliminada la dependència a capacitor-sync-version integrat l'script per execuatar-se cada vegada que es fa un build natiu (cap:build) i es canvia versió (postversion).