mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Build and release amd64 & arm64 together (macOS) (#3700)
* build and release amd64 & arm64 together Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fixes Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
d78c65d7e1
commit
9d6bed8786
7 files changed
+39
-77
No files matched your search
+14
-2
@@ -18,6 +18,18 @@
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
import { helmCli } from "../src/main/helm/helm-cli";
|
||||
import packageInfo from "../package.json";
|
||||
import { isWindows } from "../src/common/vars";
|
||||
import { HelmCli } from "../src/main/helm/helm-cli";
|
||||
import * as path from "path";
|
||||
|
||||
helmCli.ensureBinary();
|
||||
const helmVersion = packageInfo.config.bundledHelmVersion;
|
||||
|
||||
if (!isWindows) {
|
||||
Promise.all([
|
||||
new HelmCli(path.join(process.cwd(), "binaries", "client", "x64"), helmVersion).ensureBinary(),
|
||||
new HelmCli(path.join(process.cwd(), "binaries", "client", "arm64"), helmVersion).ensureBinary()
|
||||
]);
|
||||
} else {
|
||||
new HelmCli(path.join(process.cwd(), "binaries", "client", "x64"), helmVersion).ensureBinary();
|
||||
}
|
||||
@@ -118,17 +118,17 @@ class KubectlDownloader {
|
||||
}
|
||||
const downloadVersion = packageInfo.config.bundledKubectlVersion;
|
||||
const baseDir = path.join(__dirname, "..", "binaries", "client");
|
||||
const binaryArch = process.env.BINARY_ARCH || "amd64";
|
||||
const binaryTargetArch = binaryArch === "amd64" ? "x64" : "arm64";
|
||||
|
||||
const downloads = [];
|
||||
|
||||
if (isMac) {
|
||||
downloads.push({ platform: "darwin", arch: binaryArch, target: path.join(baseDir, "darwin", binaryTargetArch, "kubectl") });
|
||||
downloads.push({ platform: "darwin", arch: "amd64", target: path.join(baseDir, "darwin", "x64", "kubectl") });
|
||||
downloads.push({ platform: "darwin", arch: "arm64", target: path.join(baseDir, "darwin", "arm64", "kubectl") });
|
||||
} else if (isLinux) {
|
||||
downloads.push({ platform: "linux", arch: binaryArch, target: path.join(baseDir, "linux", binaryTargetArch, "kubectl") });
|
||||
downloads.push({ platform: "linux", arch: "amd64", target: path.join(baseDir, "linux", "x64", "kubectl") });
|
||||
downloads.push({ platform: "linux", arch: "arm64", target: path.join(baseDir, "linux", "arm64", "kubectl") });
|
||||
} else {
|
||||
downloads.push({ platform: "windows", arch: "amd64", target: path.join(baseDir, "windows", binaryTargetArch, "kubectl.exe") });
|
||||
downloads.push({ platform: "windows", arch: "amd64", target: path.join(baseDir, "windows", "x64", "kubectl.exe") });
|
||||
downloads.push({ platform: "windows", arch: "386", target: path.join(baseDir, "windows", "ia32", "kubectl.exe") });
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user