Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix npm script for windows #2245

Merged
merged 23 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions .github/workflows/scriptTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,24 @@ jobs:
restore-keys: ${{ runner.os }}-go-

- name: Test install CLI - jf
run: sh build/installcli/jf.sh && jf --version
run: |
sh build/installcli/jf.sh
jf --version

- name: Test install CLI - jfrog
run: sh build/installcli/jfrog.sh && jfrog --version
run: |
sh build/installcli/jfrog.sh
jfrog --version

- name: Test get CLI - jf
run: sh build/getcli/jf.sh && ./jf --version
run: |
sh build/getcli/jf.sh
./jf --version

- name: Test get CLI - jfrog
run: sh build/getcli/jfrog.sh && ./jfrog --version
run: |
sh build/getcli/jfrog.sh
./jfrog --version

- name: Test Build CLI - sh
run: |
Expand All @@ -64,23 +72,14 @@ jobs:
./jf${{ matrix.suite.osSuffix }} --version
if: ${{ matrix.suite.os == 'windows' }}

- name: Check if package.json build files changed
id: npm-changed-files
uses: tj-actions/changed-files@v39
with:
files: build/npm/*/package.json

- name: Test install npm - v2
working-directory: build/npm/v2
run: |
npm install
bin/jfrog${{ matrix.suite.osSuffix }} --version
if: steps.npm-changed-files.outputs.any_changed == 'false'
./bin/jfrog${{ matrix.suite.osSuffix }} --version

- name: Test install npm - v2-jf
working-directory: build/npm/v2-jf
run: |
npm install
bin/jf${{ matrix.suite.osSuffix }} --version
if: steps.npm-changed-files.outputs.any_changed == 'false'

./bin/jf${{ matrix.suite.osSuffix }} --version
File renamed without changes.
8 changes: 4 additions & 4 deletions build/npm/v2-jf/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function downloadWithProxy(myUrl) {
method: "CONNECT",
path: myUrlParts.hostname + ":443",
})
.on("connect", function (res, socket, head) {
.on("connect", function (res, socket, _) {
get(
{
host: myUrlParts.hostname,
Expand Down Expand Up @@ -110,12 +110,12 @@ function writeToFile(response) {
.on("end", function () {
file.end();
if (!process.platform.startsWith("win")) {
chmodSync(filePath, 755);
chmodSync(filePath, '755');
}
})
.on("error", function (err) {
console.error(err);
});
});
}

function getArchitecture() {
Expand Down Expand Up @@ -153,4 +153,4 @@ function getFileName() {
executable += ".exe";
}
return executable;
}
}
1 change: 0 additions & 1 deletion build/npm/v2-jf/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
8 changes: 4 additions & 4 deletions build/npm/v2/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function downloadWithProxy(myUrl) {
method: "CONNECT",
path: myUrlParts.hostname + ":443",
})
.on("connect", function (res, socket, head) {
.on("connect", function (res, socket, _) {
get(
{
host: myUrlParts.hostname,
Expand Down Expand Up @@ -110,12 +110,12 @@ function writeToFile(response) {
.on("end", function () {
file.end();
if (!process.platform.startsWith("win")) {
chmodSync(filePath, 755);
chmodSync(filePath, '755');
}
})
.on("error", function (err) {
console.error(err);
});
});
}

function getArchitecture() {
Expand Down Expand Up @@ -153,4 +153,4 @@ function getFileName() {
executable += ".exe";
}
return executable;
}
}
1 change: 0 additions & 1 deletion build/npm/v2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading