move remove config to make targets

Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
Sebastian Malton committed 2021-02-09 13:36:32 -05:00
1 parent 69ce254b81
commit b48b38c393
2 files changed
+7 -6

No files matched your search

+7
View File
@@ -38,16 +38,23 @@ test: binaries/client
.PHONY: integration-linux
integration-linux: binaries/client build-extension-types build-extensions
ifdef XDF_CONFIG_HOME
rm -rf ${XDG_CONFIG_HOME}/.config/Lens
else
rm -rf ${HOME}/.config/Lens
endif
yarn build:linux
yarn integration
.PHONY: integration-mac
integration-mac: binaries/client build-extension-types build-extensions
rm ${HOME}/Library/Application\ Support/Lens
yarn build:mac
yarn integration
.PHONY: integration-win
integration-win: binaries/client build-extension-types build-extensions
rm %APPDATA%/Lens
yarn build:win
yarn integration
-6
View File
@@ -8,7 +8,6 @@ import { AbortController } from "abort-controller";
interface AppTestingPaths {
testingPath: string,
libraryPath: string,
}
function getAppTestingPaths(): AppTestingPaths {
@@ -16,17 +15,14 @@ function getAppTestingPaths(): AppTestingPaths {
case "win32":
return {
testingPath: "./dist/win-unpacked/Lens.exe",
libraryPath: path.join(process.env.APPDATA, "Lens"),
};
case "linux":
return {
testingPath: "./dist/linux-unpacked/kontena-lens",
libraryPath: path.join(process.env.XDG_CONFIG_HOME || path.join(process.env.HOME, ".config"), "Lens"),
};
case "darwin":
return {
testingPath: "./dist/mac/Lens.app/Contents/MacOS/Lens",
libraryPath: path.join(process.env.HOME, "Library/Application\ Support/Lens"),
};
default:
throw new TypeError(`platform ${process.platform} is not supported`);
@@ -44,8 +40,6 @@ export function describeIf(condition: boolean) {
export function setup(): AppConstructorOptions {
const appPath = getAppTestingPaths();
fse.removeSync(appPath.libraryPath); // remove old install config
return {
path: appPath.testingPath,
args: [],