@gluhar/cli 2.5.0 → 2.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gluhar/cli",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "description": "Gluhar cli commands and scripts",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",
@@ -44,5 +44,5 @@
44
44
  "tsconfig-paths": "^4.2.0",
45
45
  "typescript": "^5.5.4"
46
46
  },
47
- "gitHead": "9b937011632811599d7e82eeb136136228548ca5"
47
+ "gitHead": "215aeaf1dc8234df2b12ceb4d3eba695990cddfd"
48
48
  }
@@ -1,3 +1,3 @@
1
1
  import { DeployOptions } from "./DeployOptions";
2
- export declare const deploy: (options: DeployOptions) => void;
2
+ export declare const deploy: (options: DeployOptions) => Promise<void>;
3
3
  //# sourceMappingURL=deploy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD,eAAO,MAAM,MAAM,YAAa,aAAa,SAsC5C,CAAC"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD,eAAO,MAAM,MAAM,YAAmB,aAAa,kBA+BlD,CAAC"}
@@ -5,7 +5,7 @@ const git_1 = require("../../scripts/git");
5
5
  const log_1 = require("./log");
6
6
  const deployIos_1 = require("./deployIos");
7
7
  const setSsr_1 = require("./setSsr");
8
- const deploy = (options) => {
8
+ const deploy = async (options) => {
9
9
  log_1.log.info("Deploying app...", options);
10
10
  // Deploy app to iOS
11
11
  if (options.ios) {
@@ -20,12 +20,8 @@ const deploy = (options) => {
20
20
  }
21
21
  // Default Deploy app to web
22
22
  const fromBranch = options.from || "dev";
23
- const { local, remote } = git_1.git.branch.exists("deploy");
24
- if (!local || !remote) {
25
- log_1.log.error("Branch 'deploy' does not exists or has not been pushed to or pulled from remote yet.");
26
- return;
27
- }
28
- git_1.git.branch.checkout("deploy");
23
+ const { remote } = git_1.git.branch.exists("deploy");
24
+ git_1.git.branch.checkout("deploy", { newBranch: !remote });
29
25
  log_1.log.info("Checked out to deploy branch");
30
26
  git_1.git.merge(fromBranch, true);
31
27
  log_1.log.info(`Merged with ${fromBranch}`);
@@ -5,7 +5,7 @@ const deploy_1 = require("./deploy");
5
5
  exports.default = new commander_1.Command()
6
6
  .name("deploy")
7
7
  .description("Deploy a Nuxt app. Check out to deploy branch, merge with dev and check out back to dev.")
8
- .option("--from", "From what branch to deploy. Default is 'dev' so this is used in the event we are deploying from a different branch.", "dev")
8
+ .option("--from <branch>", "From what branch to deploy. Default is 'dev' so this is used in the event we are deploying from a different branch.", "dev")
9
9
  .option("--ios", "Deploy app to iOS device using Capacitor.")
10
10
  .option("--android", "Deploy app to Android device using Capacitor.")
11
11
  .option("--ssr", "Set SSR before deployment. Default is undefined for no change.")