donder-release-cli 1.3.0 → 1.4.1-alpha.0

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) Cloudoki <opensource@cloudoki.com> (cloudoki.com)
3
+ Copyright (c) South Bay Warriors <bruno@southbaywarriors.com> (southbaywarriors.com)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
@@ -4,13 +4,13 @@ const fs = require("fs");
4
4
  const path = require("path");
5
5
  const { exec } = require("child_process");
6
6
 
7
- const cargoDir = path.dirname("$HOME" + ".cargo");
7
+ const homeDir =
8
+ process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH;
9
+ const cargoDir = path.join(homeDir, ".cargo");
8
10
 
9
11
  // check if directory exists
10
- if (fs.existsSync(cargoDir)) {
11
- // console.log("Cargo found.");
12
- } else {
13
- const setCargo = 'PATH="/$HOME/.cargo/bin:${PATH}"';
12
+ if (!fs.existsSync(cargoDir)) {
13
+ const setCargo = 'PATH="/$HOME/.cargo/bin:$PATH"';
14
14
  console.log("Installing deps [cargo].");
15
15
 
16
16
  exec(
@@ -26,18 +26,13 @@ if (fs.existsSync(cargoDir)) {
26
26
  );
27
27
  }
28
28
 
29
- const features = process.env.npm_config_features
30
- ? `--features ${process.env.npm_config_features.replace(",", " ")}`
31
- : "";
32
29
  const version = process.env.npm_config_version
33
30
  ? process.env.npm_config_version
34
31
  : require("../package.json").version;
35
32
 
36
- console.log(
37
- `Installing and compiling donder-release ${version} ${features} ...`
38
- );
33
+ console.log(`Installing and compiling donder-release ${version}...`);
39
34
  exec(
40
- `cargo install donder-release --vers ${version} ${features}`,
35
+ `cargo install donder-release --vers ${version}`,
41
36
  (error, stdout, stderr) => {
42
37
  console.log(stdout);
43
38
  if (error || stderr) {
package/npm/uninstall.js CHANGED
@@ -4,29 +4,9 @@ const fs = require("fs");
4
4
  const path = require("path");
5
5
  const { exec } = require("child_process");
6
6
 
7
- const cargoDir = path.dirname("$HOME" + ".cargo");
8
-
9
- // check if directory exists
10
- if (fs.existsSync(cargoDir)) {
11
- // console.log("Cargo found.");
12
- } else {
13
- const setCargo = 'PATH="/$HOME/.cargo/bin:${PATH}"';
14
- console.log("Installing deps [cargo].");
15
-
16
- exec(
17
- `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && ${setCargo}`,
18
- (error) => {
19
- if (error) {
20
- console.log(
21
- "curl failed! Curl may not be installed on the OS. View https://curl.se/download.html to install."
22
- );
23
- console.log(error);
24
- }
25
- }
26
- );
27
- }
28
-
29
- const binp = path.join(cargoDir, "bin", "donder-release");
7
+ const homeDir =
8
+ process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH;
9
+ const binp = path.join(homeDir, ".cargo", "bin", "donder-release");
30
10
 
31
11
  if (fs.existsSync(binp)) {
32
12
  console.log("Uninstalling donder-release...");
package/package.json CHANGED
@@ -1,8 +1,16 @@
1
1
  {
2
2
  "name": "donder-release-cli",
3
- "version": "1.3.0",
3
+ "version": "1.4.1-alpha.0",
4
4
  "description": "Quickly create releases on Github from the command line or CI using conventional commits.",
5
- "author": "Bruno Morgado <bruno@cloudoki.com>",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/south-bay-warriors/donder-release"
8
+ },
9
+ "bugs": {
10
+ "url": "https://github.com/south-bay-warriors/donder-release/issues",
11
+ "email": "support@southbaywarriors.com"
12
+ },
13
+ "author": "Bruno Morgado <bruno@southbaywarriors.com>",
6
14
  "license": "MIT",
7
15
  "main": "npm/start.js",
8
16
  "bin": {