Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: IamLizu/verceler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.8
Choose a base ref
...
head repository: IamLizu/verceler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.9
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 1, 2024

  1. pass token in vercel env ops

    IamLizu committed Aug 1, 2024
    Copy the full SHA
    f772970 View commit details
  2. 1.0.9

    IamLizu committed Aug 1, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    400128a View commit details
Showing with 25 additions and 9 deletions.
  1. +1 −1 package.json
  2. +24 −8 src/utils/VercelManager.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verceler",
"version": "1.0.8",
"version": "1.0.9",
"description": "Automates tag or released based deployments on Vercel using GitHub Actions",
"main": "src/index.js",
"bin": {
32 changes: 24 additions & 8 deletions src/utils/VercelManager.js
Original file line number Diff line number Diff line change
@@ -64,9 +64,13 @@ class VercelManager {

checkIfEnvExists(key) {
try {
const result = spawn.sync("vercel", ["env", "ls", "production"], {
encoding: "utf-8",
});
const result = spawn.sync(
"vercel",
["env", "ls", "production", "--token", this.vercelToken],
{
encoding: "utf-8",
}
);
if (result.error) {
throw result.error;
}
@@ -79,10 +83,14 @@ class VercelManager {

addEnvVariable(key, value, env, bar) {
try {
const result = spawn.sync("vercel", ["env", "add", key, env], {
input: value,
stdio: "pipe",
});
const result = spawn.sync(
"vercel",
["env", "add", key, env, "--token", this.vercelToken],
{
input: value,
stdio: "pipe",
}
);
if (result.error) {
throw result.error;
}
@@ -99,7 +107,15 @@ class VercelManager {
try {
const result = spawn.sync(
"vercel",
["env", "add", key, env, "--force"],
[
"env",
"add",
key,
env,
"--force",
"--token",
this.vercelToken,
],
{ input: value, stdio: "pipe" }
);
if (result.error) {