Skip to content

Commit

Permalink
commit by Serverless devs docs 12-27-2023 6:47:52
Browse files Browse the repository at this point in the history
  • Loading branch information
serverless-devs committed Dec 27, 2023
1 parent 068c8c2 commit 06eeef3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions content/en/serverless-devs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This quick start case takes [Alibaba Cloud Function Computing](https://github.co
Install via [npm](https://www.npmjs.com/) package management: applicable to Windows, Mac, and Linux platforms that have been pre-installed with npm. Execute the following commands on Windows, Mac, and Linux platforms to install Serverless Devs Tool.

```shell script
$ npm install @serverless-devs/s3 -g
$ npm install @serverless-devs/s -g
```
Or install via [yarn](https://yarnpkg.com/)

Expand All @@ -34,7 +34,7 @@ $ yarn global add @serverless-devs/s

> **illustrate**:
> - If you execute the command under Linux or macOS and report an error and the error message is `Command not found`, please execute the command `ln -s serverless-devs installation location /usr/bin`, serverless-devs installation location can be found by `find / -name s`.
> - If an error is reported when executing this command under Linux and the error message is `Error: EACCES: permission denied`, please execute the command `sudo npm install @serverless-devs/s3 -g`.
> - If an error is reported when executing this command under Linux and the error message is `Error: EACCES: permission denied`, please execute the command `sudo npm install @serverless-devs/s -g`.
> - If you have a slow installation process in mainland, you can consider using Taobao npm source. The installation command is `npm --registry=https://registry.npm.taobao.org install @serverless-devs/s -g`.
### Install by downloading the binary
Expand Down
12 changes: 6 additions & 6 deletions content/zh/serverless-devs/cicd.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm install -g @serverless-devs/s3
- run: npm install -g @serverless-devs/s
- run: s config add --AccessKeyID ${{secrets.AccessKeyID}} --AccessKeySecret ${{secrets.AccessKeySecret}} -a default -f
- run: s deploy -y --use-local
```
主要包括几个部分的内容:
- `run: npm install -g @serverless-devs/s3`:
- `run: npm install -g @serverless-devs/s`:
通过 NPM 安装最新版本的 Serverless Devs 开发者工具;
- `run: s config add --AccessKeyID ${{secrets.AccessKeyID}} --AccessKeySecret ${{secrets.AccessKeySecret}} -a default -f`
通过`config`命令进行密钥等信息的配置;
Expand Down Expand Up @@ -91,14 +91,14 @@ stages: # 构建阶段配置
goals: | # 安装依赖,配置相关主题、部署参数并发布部署
node -v
npm -v
npm install -g @serverless-devs/s3
npm install -g @serverless-devs/s
s config add --AccessKeyID $ACCESSKEYID --AccessKeySecret $ACCESSKEYSECRET -a default -f
s deploy -y --use-local
```

主要包括几个部分的内容:

- `npm install -g @serverless-devs/s3`:
- `npm install -g @serverless-devs/s`:
通过 NPM 安装最新版本的 Serverless Devs 开发者工具;
- `s config add --AccessKeyID $ACCESSKEYID --AccessKeySecret $ACCESSKEYSECRET -a default -f`
通过`config`命令进行密钥等信息的配置;
Expand Down Expand Up @@ -211,14 +211,14 @@ jenkins-alicloud-access-key-secret : 阿里云 accessKeySecret

```
# input your command here
npm install -g @serverless-devs/s3
npm install -g @serverless-devs/s
s config add --AccessKeyID ${ACCESSKEYID} --AccessKeySecret ${ACCESSKEYSECRET} -a default -f
s deploy -y --use-local
```

这里主要包括三个部分:

- `npm install -g @serverless-devs/s3`:
- `npm install -g @serverless-devs/s`:
通过 NPM 安装最新版本的 Serverless Devs 开发者工具(虽然云效中已经拥有了相关版本的 Serverless Devs,但是实际上,这个版本可能比较老旧,所以可以通过该命令安装最新版本);
- `s config add --AccessKeyID ${ACCESSKEYID} --AccessKeySecret ${ACCESSKEYSECRET} -a default -f`
通过`config`命令进行密钥等信息的配置;
Expand Down
16 changes: 8 additions & 8 deletions content/zh/serverless-devs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ category: '概述'
通过 [npm](https://www.npmjs.com/) 包管理安装:适用于已经预装了 npm 的 Windows、Mac、Linux 平台。在 Windows、Mac、Linux 平台执行以下命令安装 Serverless Devs Tool工具。

```shell script
$ npm install @serverless-devs/s3 -g
$ npm install @serverless-devs/s -g
```
或者 通过 [yarn](https://yarnpkg.com/) 进行安装

```shell script
$ yarn global add @serverless-devs/s3
$ yarn global add @serverless-devs/s
```

> **说明**:
> - 如果在 Linux 或 MacOS 下执行该命令报错且报错信息为 `未找到命令`,请执行命令 `ln -s serverless-devs安装位置 /usr/bin`,serverless-devs安装位置可以通过`find / -name s` 查找。
> - 如果在 Linxu 下执行该命令报错且报错信息为 `Error: EACCES: permission denied`,请执行命令 `sudo npm install @serverless-devs/s3 -g`
> - 如果安装过程较慢,可以考虑使用淘宝 npm 源,安装命令为 `npm --registry=https://registry.npm.taobao.org install @serverless-devs/s3 -g`
> - 如果在 Linxu 下执行该命令报错且报错信息为 `Error: EACCES: permission denied`,请执行命令 `sudo npm install @serverless-devs/s -g`
> - 如果安装过程较慢,可以考虑使用淘宝 npm 源,安装命令为 `npm --registry=https://registry.npm.taobao.org install @serverless-devs/s -g`
### 通过下载二进制安装
打开 [releases](https://github.com/Serverless-Devs/Serverless-Devs/releases) 页面,在最新的发布版本(Release)中选择对应平台的压缩包,点击直接下载。
Expand Down Expand Up @@ -67,7 +67,7 @@ $ mv s-*-linux /usr/local/bin/s
4. 验证版本
```
$ s -v
@serverless-devs/s3: 0.0.13
@serverless-devs/s: 0.0.13
```


Expand All @@ -88,7 +88,7 @@ $ mv s-*-macos /usr/local/bin/s
4. 验证版本
```
$ s -v
@serverless-devs/s3: 0.0.13
@serverless-devs/s: 0.0.13
```

### 通过脚本安装
Expand All @@ -103,14 +103,14 @@ $ curl -o- -L http://cli.so/install.sh | bash

Serverless Devs 开发者工具会不定期的进行更新升级。开发者在使用 Serverless Devs 开发者工具时,可以根据系统提醒进行进行最新版本的感知。

当客户端感知到系统升级之后,开发者可以通过命令`npm i -g @serverless-devs/s3`进行更新操作,也可以通过 [Release](https://github.com/Serverless-Devs/Serverless-Devs/releases) 信息查看升级的具体内容,以决定是否进行本次升级。
当客户端感知到系统升级之后,开发者可以通过命令`npm i -g @serverless-devs/s`进行更新操作,也可以通过 [Release](https://github.com/Serverless-Devs/Serverless-Devs/releases) 信息查看升级的具体内容,以决定是否进行本次升级。

> 例如:我当前的 Serverless Devs 的版本是`2.0.89`,当系统升级之后,我再使用Serverless Devs开发者工具,工具将会给出相对应的提醒:
> ```shell script
> ╭───────────────────────────────────────────────╮
> │ │
> │ Update available 2.0.89 → 2.0.90 │
> │ Run npm i -g @serverless-devs/s3 to update │
> │ Run npm i -g @serverless-devs/s to update │
> │ │
> ╰───────────────────────────────────────────────╯
> ```
Expand Down
2 changes: 1 addition & 1 deletion content/zh/serverless-devs/tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ AI Tips:
You can try to solve the problem through: http://qa.devsapp.cn/7867adf78017601dffd8c3611c90cadf.html
TraceId: a483e74739551640838688289
Environment: @serverless-devs/s3: 0.0.13, @serverless-devs/core: 0.1.23, darwin-x64, node-v12.15.0
Environment: @serverless-devs/s: 0.0.13, @serverless-devs/core: 0.1.23, darwin-x64, node-v12.15.0
Documents: https://www.serverless-devs.com
Discussions: https://github.com/Serverless-Devs/Serverless-Devs/discussions
Issues: https://github.com/Serverless-Devs/Serverless-Devs/issues
Expand Down

0 comments on commit 06eeef3

Please sign in to comment.