Skip to content

Commit

Permalink
feature/dont limit functionality with debug env
Browse files Browse the repository at this point in the history
  • Loading branch information
dogfrogfog committed Nov 12, 2024
1 parent b568e33 commit 2ad3304
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/new-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
echo -e "\nREPO_PROD_BRANCH=\"main\"\nREPO_TYPE=\"github\"\nREPO_ID=${{ github.event.repository.id }}\nREPO_NAME=${{ github.repository }}" >> apps/sanity/.env
echo -e "\nREPO_PROD_BRANCH=\"main\"\nREPO_TYPE=\"github\"\nREPO_ID=${{ github.event.repository.id }}\nREPO_NAME=${{ github.repository }}" >> apps/storyblok/.env
# - name: Remove unnecessary scripts
# run: |
# jq 'del(.scripts["pull-stories"])' apps/storyblok/package.json > apps/storyblok/package.json.tmp
# mv apps/storyblok/package.json.tmp apps/storyblok/package.json
- name: Remove unnecessary scripts
run: |
jq 'del(.scripts["pull-stories"])' apps/storyblok/package.json > apps/storyblok/package.json.tmp
mv apps/storyblok/package.json.tmp apps/storyblok/package.json
- name: Commit, push, and remove GitHub Actions workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
21 changes: 10 additions & 11 deletions apps/storyblok/CLI/sb.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,16 @@ const main = async () => {
"Successfully created Vercel production and preview deployments 🎉",
);

if (!process.env.DEBUG) {
spinner.start("Updating apps/storyblok/package.json ⏳");
modifyFile("../package.json", "293915", spaceId);
spinner.succeed("apps/storyblok/package.json updated ✅");

spinner.start("Removing Sanity folder ⏳");
execSync("rm -rf ../../sanity", {
stdio: "ignore",
});
spinner.succeed("Sanity folder removed ✅");
}
spinner.start("Updating apps/storyblok/package.json ⏳");
modifyFile("../package.json", "293915", spaceId);
spinner.succeed("apps/storyblok/package.json updated ✅");

spinner.start("Removing unrelated files and scripts ⏳");
execSync("rm -rf ../../sanity", {
stdio: "ignore",
});

spinner.succeed("Sanity folder removed ✅");

console.log(
colorText(
Expand Down

0 comments on commit 2ad3304

Please sign in to comment.