跳到正文
Vercel Blog(vercel.com)· Thibault Miranda de Oliveira·· 2 小時前品質評分64

Vercel CLI 允許設定新專案自動過期

Vercel CLI can now set new projects to expire

重點導讀

Vercel CLI 現已支援在部署時設定新專案的自動過期,過期後專案將被自動刪除。

  • 使用方式:vercel deploy --delete-project-after <duration>,可選時間單位為 1h、1d、1w、2w、30d。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

正文

You can now set a new project to expire when you deploy it with Vercel CLI. Expired projects are deleted automatically, so prototypes, demos, and test apps don't need cleaning up by hand.

Run vercel deploy with --delete-project-after and a duration:

# Delete the new project after one day

vercel deploy --delete-project-after 1d

Deploying a new project that expires after one day

Supported durations are 1h, 1d, 1w, 2w, and 30d, and the CLI prints the date and time when the project expires. The flag only applies when vercel deploy creates the project. If you deploy to an existing project with the flag, its expiration doesn't change and the CLI prints a warning.

To remove a project's expiration, run vercel project keep:

vercel project keep my-project

Removing a project's expiration

Update Vercel CLI to v65.12.0 or later to get started. Learn more in the vercel deploy documentation.

來源: Vercel Blog (vercel.com)
開啟原文

讀者討論

理性交流 · 即時討論