Skip to content

Commit

Permalink
Merged
Browse files Browse the repository at this point in the history
  • Loading branch information
svenstaro committed Jan 24, 2020
2 parents baf13c5 + f5b8d57 commit 5d3f0af
Show file tree
Hide file tree
Showing 753 changed files with 83,959 additions and 3,613 deletions.
24 changes: 13 additions & 11 deletions lib/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,29 @@ const fs = __importStar(require("fs"));
const os = __importStar(require("os"));
const core = __importStar(require("@actions/core"));
const exec = __importStar(require("@actions/exec"));
const download = __importStar(require("download"));
const download = require("download");
const decompressTarxz = require("decompress-tarxz");
const path = __importStar(require("path"));
function downloadUpx() {
return __awaiter(this, void 0, void 0, function* () {
const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), "upx-action-"));
if (os.type() == "Linux") {
yield download.default('https://github.com/upx/upx-automatic-builds/blob/devel-20200108-0f4975f-travis/amd64-linux-gcc-9-release/upx-git-0f4975fd7ffb.out?raw=true', tmpdir, { filename: "upx" });
const upx_path = `${tmpdir}/upx`;
yield download('https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz', tmpdir, {
extract: true, plugins: [decompressTarxz()]
});
const upx_path = `${tmpdir}/upx-3.96-amd64_linux/upx`;
fs.chmodSync(upx_path, "755");
return upx_path;
}
else if (os.type() == "Darwin") {
yield download.default('https://github.com/upx/upx-automatic-builds/blob/devel-20200108-0f4975f-travis/amd64-darwin-clang-1100-release/upx-git-0f4975fd7ffb.out?raw=true', tmpdir, { filename: "upx" });
const upx_path = `${tmpdir}/upx`;
fs.chmodSync(upx_path, "755");
return upx_path;
yield exec.exec('brew install upx');
return "upx";
}
else if (os.type() == "Windows_NT") {
yield download.default('https://github.com/upx/upx-automatic-builds/blob/devel-20200108-0f4975f-appveyor/amd64-win64-msvc-14.1-release/upx-git-0f4975fd7ffb.exe?raw=true', tmpdir, { filename: "upx.exe" });
const upx_path = `${tmpdir}/upx.exe`;
fs.chmodSync(upx_path, "755");
yield download('https://github.com/upx/upx/releases/download/v3.96/upx-3.96-win64.zip', tmpdir, {
extract: true
});
const upx_path = `${tmpdir}/upx-3.96-win64/upx.exe`;
return upx_path;
}
throw "unsupported OS";
Expand All @@ -60,7 +62,7 @@ function run() {
core.info('🏃 Running strip...');
yield exec.exec(`strip ${strip_args} ${file}`);
}
core.info('⬇️ Downloading UPX...');
core.info('⬇️ Downloading UPX...');
const upx_path = yield downloadUpx();
core.info('🏃 Running UPX...');
yield exec.exec(`${upx_path} ${args} ${file}`);
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/detect-libc

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

1 change: 1 addition & 0 deletions node_modules/.bin/lzmajs

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

1 change: 1 addition & 0 deletions node_modules/.bin/mkdirp

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

1 change: 1 addition & 0 deletions node_modules/.bin/needle

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

1 change: 1 addition & 0 deletions node_modules/.bin/node-pre-gyp

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

1 change: 1 addition & 0 deletions node_modules/.bin/nopt

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

1 change: 1 addition & 0 deletions node_modules/.bin/rc

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

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

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

1 change: 1 addition & 0 deletions node_modules/.bin/semver

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

6 changes: 3 additions & 3 deletions node_modules/@actions/core/lib/command.d.ts

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

39 changes: 22 additions & 17 deletions node_modules/@actions/core/lib/command.js

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

2 changes: 1 addition & 1 deletion node_modules/@actions/core/lib/command.js.map

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

11 changes: 9 additions & 2 deletions node_modules/@actions/core/lib/core.js

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

2 changes: 1 addition & 1 deletion node_modules/@actions/core/lib/core.js.map

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

29 changes: 13 additions & 16 deletions node_modules/@actions/core/package.json

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

21 changes: 9 additions & 12 deletions node_modules/@actions/exec/package.json

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

Loading

0 comments on commit 5d3f0af

Please sign in to comment.