Skip to content

Commit

Permalink
fixed versioning for dmg
Browse files Browse the repository at this point in the history
  • Loading branch information
shannah committed Oct 5, 2024
1 parent 4e4b9e9 commit 630ef1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/src/main/java/ca/weblite/jdeploy/JDeploy.java
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,8 @@ private String fetchJdeployBundleCode(AppInfo appInfo) throws IOException {

private void loadAppInfo(AppInfo appInfo) throws IOException {
appInfo.setNpmPackage((String)m().get("name"));
appInfo.setNpmVersion(getString("version", "latest"));
String packageJsonVersion = m().get("version") != null ? m().get("version").toString() : "latest";
appInfo.setNpmVersion(packageJsonVersion);
if (isPackageSigningEnabled()) {
try {
appInfo.setEnableCertificatePinning(true);
Expand Down Expand Up @@ -1760,7 +1761,7 @@ public BundlerResult bundle(
appInfo.setNpmSource(bundlerSettings.getSource());
}

String packageJsonVersion = getString("version", "latest");
String packageJsonVersion = m().getString("version");
if (bundlerSettings.getBundleVersion() != null) {
appInfo.setNpmVersion(bundlerSettings.getBundleVersion());
} else if (bundlerSettings.isAutoUpdateEnabled() && !packageJsonVersion.startsWith("0.0.0-")) {
Expand Down

0 comments on commit 630ef1a

Please sign in to comment.