eitri-cli 1.9.0-beta.10 → 1.9.0-beta.11
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/bitbucket-pipelines.yml +25 -10
- package/eitri-cli-v2/Cargo.lock +0 -1
- package/eitri-cli-v2/Cargo.toml +0 -1
- package/eitri-cli-v2/index.darwin.node +0 -0
- package/eitri-cli-v2/index.js +11 -2
- package/eitri-cli-v2/index.unix.node +0 -0
- package/eitri-cli-v2/index.win32.node +0 -0
- package/eitri-cli-v2/node_modules/.package-lock.json +17 -0
- package/eitri-cli-v2/package-lock.json +0 -1
- package/eitri-cli-v2/package.json +3 -3
- package/eitri-cli-v2/src/services/workspace.rs +13 -10
- package/eitri-cli-v2/yarn.lock +1 -1
- package/package.json +1 -1
- package/test/e2e/cli.test.js +1 -1
- package/eitri-cli-v2/node_modules/.yarn-integrity +0 -16
package/bitbucket-pipelines.yml
CHANGED
|
@@ -18,15 +18,21 @@ pipelines:
|
|
|
18
18
|
- node
|
|
19
19
|
script:
|
|
20
20
|
- apt-get update
|
|
21
|
+
- apt-get install -y wget
|
|
22
|
+
- wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
23
|
+
- apt-get install -y ./google-chrome-stable_current_amd64.deb
|
|
24
|
+
- export PUPPETEER_EXECUTABLE_PATH='/usr/bin/google-chrome-stable'
|
|
21
25
|
- apt-get install -y libssl-dev
|
|
22
26
|
- apt-get install -y pkg-config
|
|
23
|
-
- apt-get install -y
|
|
27
|
+
- apt-get install -y git
|
|
28
|
+
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
29
|
+
- export PATH="/root/.cargo/bin:${PATH}"
|
|
30
|
+
- rustup --version
|
|
31
|
+
- rustup target add x86_64-unknown-linux-gnu
|
|
24
32
|
- cd eitri-cli-v2
|
|
25
|
-
-
|
|
33
|
+
- npm i
|
|
34
|
+
- npm run build
|
|
26
35
|
- cd ..
|
|
27
|
-
- apt-get install -y git
|
|
28
|
-
- apt-get install -y chromium
|
|
29
|
-
- export PUPPETEER_EXECUTABLE_PATH='/usr/bin/chromium-browser'
|
|
30
36
|
- yarn
|
|
31
37
|
- npm i -g .
|
|
32
38
|
- yarn test cli.test.js --force-exit
|
|
@@ -38,7 +44,10 @@ pipelines:
|
|
|
38
44
|
- apt-get update
|
|
39
45
|
- apt-get install -y libssl-dev
|
|
40
46
|
- apt-get install -y pkg-config
|
|
41
|
-
-
|
|
47
|
+
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
48
|
+
- export PATH="/root/.cargo/bin:${PATH}"
|
|
49
|
+
- rustup --version
|
|
50
|
+
- rustup target add x86_64-unknown-linux-gnu
|
|
42
51
|
- cd eitri-cli-v2
|
|
43
52
|
- cargo test
|
|
44
53
|
branches:
|
|
@@ -49,6 +58,7 @@ pipelines:
|
|
|
49
58
|
# - step: *runTests
|
|
50
59
|
# - step: *runRustTests
|
|
51
60
|
- step:
|
|
61
|
+
image: joseluisq/rust-linux-darwin-builder:1.76.0
|
|
52
62
|
name: "Generation of a new version: beta or stable."
|
|
53
63
|
caches:
|
|
54
64
|
- node
|
|
@@ -65,17 +75,22 @@ pipelines:
|
|
|
65
75
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
66
76
|
- export PATH="/root/.cargo/bin:${PATH}"
|
|
67
77
|
- rustup --version
|
|
78
|
+
- curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
|
|
68
79
|
- rustup target add x86_64-pc-windows-gnu
|
|
69
80
|
- rustup target add x86_64-unknown-linux-gnu
|
|
81
|
+
- export CC=o64-clang
|
|
82
|
+
- export CXX=o64-clang++
|
|
70
83
|
- cd eitri-cli-v2
|
|
71
|
-
-
|
|
72
|
-
-
|
|
84
|
+
- npm install
|
|
85
|
+
- npm run build-release:unix
|
|
86
|
+
- npm run build-release:win32
|
|
87
|
+
- npm run build-release:darwin
|
|
73
88
|
- rm -rf target
|
|
74
89
|
- cd ..
|
|
75
90
|
- echo 'Start release'
|
|
76
91
|
- echo 'If there is a new version, it will be automatically published on NPM according to the channel/branch (beta or master (stable)).'
|
|
77
|
-
-
|
|
78
|
-
-
|
|
92
|
+
- npm i
|
|
93
|
+
- npm run release
|
|
79
94
|
- RELEASE_VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
|
|
80
95
|
- node -e "const fs = require('fs'); const packageJson = JSON.parse(fs.readFileSync('package.json')); packageJson.version = process.env.RELEASE_VERSION; fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 4));"
|
|
81
96
|
- echo 'New release'
|
package/eitri-cli-v2/Cargo.lock
CHANGED
package/eitri-cli-v2/Cargo.toml
CHANGED
|
Binary file
|
package/eitri-cli-v2/index.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
const os = require(
|
|
2
|
-
|
|
1
|
+
const os = require("os");
|
|
2
|
+
|
|
3
|
+
if (os.platform() === "darwin") {
|
|
4
|
+
module.exports = require("./index.darwin.node");
|
|
5
|
+
} else if (os.platform() === "linux") {
|
|
6
|
+
module.exports = require("./index.unix.node");
|
|
7
|
+
} else if (os.platform() === "win32") {
|
|
8
|
+
module.exports = require("./index.win32.node");
|
|
9
|
+
} else {
|
|
10
|
+
console.error("Plataforma não supotada")
|
|
11
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eitri-cli-v2",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"node_modules/cargo-cp-artifact": {
|
|
8
|
+
"version": "0.1.8",
|
|
9
|
+
"resolved": "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz",
|
|
10
|
+
"integrity": "sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==",
|
|
11
|
+
"dev": true,
|
|
12
|
+
"bin": {
|
|
13
|
+
"cargo-cp-artifact": "bin/cargo-cp-artifact.js"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "cargo-cp-artifact -nc index.unix.node -- cargo build --message-format=json-render-diagnostics --target x86_64-unknown-linux-gnu",
|
|
8
8
|
"build:win32": "cargo-cp-artifact -nc index.win32.node -- cargo build --message-format=json-render-diagnostics --target x86_64-pc-windows-gnu",
|
|
9
|
+
"build:darwin": "cargo-cp-artifact -nc index.darwin.node -- cargo build --message-format=json-render-diagnostics --target=aarch64-apple-darwin",
|
|
9
10
|
"build-debug": "npm run build --",
|
|
10
|
-
"build-release": "npm run build -- --release",
|
|
11
|
+
"build-release:unix": "npm run build -- --release",
|
|
11
12
|
"build-release:win32": "npm run build:win32 -- --release",
|
|
12
|
-
"
|
|
13
|
-
"install:win32": "npm run build-release:win32",
|
|
13
|
+
"build-release:darwin": "npm run build:darwin -- --release",
|
|
14
14
|
"test": "cargo test"
|
|
15
15
|
},
|
|
16
16
|
"author": "",
|
|
@@ -2,7 +2,6 @@ use std::{env, fs, path::Path, process::exit};
|
|
|
2
2
|
|
|
3
3
|
use crate::model::eitri_conf::EitriConf;
|
|
4
4
|
use crate::utils::convert_eitri_conf;
|
|
5
|
-
use tokio::fs::try_exists;
|
|
6
5
|
|
|
7
6
|
pub async fn read_eitri_conf() -> EitriConf {
|
|
8
7
|
let current_dir = match env::current_dir().ok() {
|
|
@@ -17,14 +16,7 @@ pub async fn read_eitri_conf() -> EitriConf {
|
|
|
17
16
|
let file_path = Path::new(¤t_dir_str);
|
|
18
17
|
let file_path = file_path.join("eitri-app.conf.json");
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
Ok(exists) => exists,
|
|
22
|
-
Err(_) => false,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
if !exists_json {
|
|
26
|
-
convert_eitri_conf::convert();
|
|
27
|
-
}
|
|
19
|
+
convert_eitri_conf::convert();
|
|
28
20
|
|
|
29
21
|
let content = match fs::read_to_string(file_path.display().to_string()).ok() {
|
|
30
22
|
Some(it) => it,
|
|
@@ -35,7 +27,18 @@ pub async fn read_eitri_conf() -> EitriConf {
|
|
|
35
27
|
};
|
|
36
28
|
|
|
37
29
|
let eitri_conf: EitriConf = match serde_json::from_str(&content).ok() {
|
|
38
|
-
Some(it) =>
|
|
30
|
+
Some(it) => {
|
|
31
|
+
match fs::remove_file(file_path.display().to_string()) {
|
|
32
|
+
Ok(()) => (),
|
|
33
|
+
Err(_err) => {
|
|
34
|
+
eprintln!(
|
|
35
|
+
"Houve um erro ao tentar ler o eitri-app.conf do projeto. Tente novamente."
|
|
36
|
+
);
|
|
37
|
+
exit(1)
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
it
|
|
41
|
+
}
|
|
39
42
|
None => {
|
|
40
43
|
eprintln!("Houve um erro ao fazer parse do json");
|
|
41
44
|
exit(1)
|
package/eitri-cli-v2/yarn.lock
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
|
|
5
5
|
cargo-cp-artifact@^0.1:
|
|
6
6
|
version "0.1.8"
|
|
7
|
-
resolved "https://registry.
|
|
7
|
+
resolved "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz"
|
|
8
8
|
integrity sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==
|
package/package.json
CHANGED
package/test/e2e/cli.test.js
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"systemParams": "linux-x64-108",
|
|
3
|
-
"modulesFolders": [
|
|
4
|
-
"node_modules"
|
|
5
|
-
],
|
|
6
|
-
"flags": [],
|
|
7
|
-
"linkedModules": [],
|
|
8
|
-
"topLevelPatterns": [
|
|
9
|
-
"cargo-cp-artifact@^0.1"
|
|
10
|
-
],
|
|
11
|
-
"lockfileEntries": {
|
|
12
|
-
"cargo-cp-artifact@^0.1": "https://registry.yarnpkg.com/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz#353814f49f6aa76601a4bcb3ea5f3071180b90de"
|
|
13
|
-
},
|
|
14
|
-
"files": [],
|
|
15
|
-
"artifacts": {}
|
|
16
|
-
}
|