Skip to content

Commit aebe0e5

Browse files
authored
Release 0.1.63 (#117)
* feat: support env serverless_devs_config_home to set workspace Signed-off-by: xsahxl <xsahxl@126.com> * publish: 0.1.63 Signed-off-by: xsahxl <xsahxl@126.com> --------- Signed-off-by: xsahxl <xsahxl@126.com>
1 parent fb1f6ef commit aebe0e5

5 files changed

Lines changed: 8 additions & 21 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@serverless-devs/core",
3-
"version": "0.1.62",
3+
"version": "0.1.63",
44
"description": "Serverless Devs Tool Core Component",
55
"keywords": [
66
"Serverless",
@@ -110,4 +110,4 @@
110110
"**/*.{js,jsx,ts}": "f2elint exec eslint"
111111
},
112112
"gitHead": "aec19d7a89cb711f0a246ecf77e79d3668fcb8da"
113-
}
113+
}

publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Type: Component
22
Name: core
33
Provider:
44
- 阿里云
5-
Version: 0.1.62
5+
Version: 0.1.63
66
Description: Serverless Devs 核心组件
77
HomePage: https://github.com/Serverless-Devs/core
88
Tags: #标签详情

src/daemon/constant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
DEFAULT_CORE_VERSION: '0.1.62',
2+
DEFAULT_CORE_VERSION: '0.1.63',
33
};

src/libs/common.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import getYamlContent from './getYamlContent';
99
import getMAC from 'getmac';
1010
import yaml from 'js-yaml';
1111
import _ from 'lodash';
12-
import { getCurrentEnvironment } from '@serverless-devs/utils';
12+
import * as utils from '@serverless-devs/utils';
1313

1414
const semver = require('semver');
1515

@@ -82,20 +82,7 @@ export const getCliVersion = (defaultValue?: string) => {
8282
return CLI_VERSION || defaultValue;
8383
};
8484

85-
export function getRootHome() {
86-
const shomedir = path.join(USER_HOME, '.s');
87-
const sJsonPath = path.join(shomedir, 'config', 's.json');
88-
if (fs.existsSync(sJsonPath)) {
89-
const data = fs.readJsonSync(sJsonPath);
90-
return data.workspace ? formatWorkspacePath(data.workspace) : shomedir;
91-
}
92-
// 不存在 ~/.s/config/s.json
93-
if (semver.gt(getCliVersion('0.0.0'), '2.0.92')) {
94-
const env = getCurrentEnvironment();
95-
if (env === 'yunxiao') return path.join(USER_HOME, '.cache', '.s');
96-
}
97-
return shomedir;
98-
}
85+
export const getRootHome = utils.getRootHome;
9986

10087
export const isBetaS = () => getCliVersion('0.0.0').includes('beta');
10188

0 commit comments

Comments
 (0)