Skip to content

Commit

Permalink
Fixing as much as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
conmaster2112 committed Oct 10, 2024
1 parent b73307f commit 5a123af
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 98 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
name: Update Docs
name: Update Docs Generator
on:
push:
#schedule:
#- cron: '*/20 * * * *'
push:
branches:
main
schedule:
- cron: '*/20 * * * *'
permissions:
contents: write
jobs:

Updater:
Main-Updater:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: "main"
fetch-depth: '0'
- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.4
with:
node-version: '22'
cache: 'npm'
Expand Down
80 changes: 0 additions & 80 deletions src/flags/changelog.js

This file was deleted.

Empty file removed src/flags/changelog/index.js
Empty file.
10 changes: 3 additions & 7 deletions src/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export async function GithubPostNewBranch(branch) {


// Basic checkout command execution
cmd = `git push -u origin ${branch}`;
cmd = `git push -u ${branch}`;

result = await ExecuteCommand(cmd);
if(result.exitCode != 0) {
Expand Down Expand Up @@ -244,12 +244,8 @@ export async function GithubChekoutBranch(branch, force) {
return false;
}

await ExecuteCommand("git remote");

await ExecuteCommand("git branch -r -a");

// Basic checkout command execution
cmd = `git checkout origin/${branch}${force?" -f":""}`;
cmd = `git checkout ${branch}${force?" -f":""}`;

result = await ExecuteCommand(cmd);
if(result.exitCode != 0) {
Expand Down Expand Up @@ -300,7 +296,7 @@ export async function GithubCommitAndPush(branch, version, isPreview) {
result = await ExecuteCommand(`git commit -m \"New ${branch} v${isPreview?version:GetEngineVersion(version)}\"`);
if(result.exitCode != 0) return false;

result = await ExecuteCommand("git push --force origin " + branch);
result = await ExecuteCommand("git push --force " + branch);
if(result.exitCode != 0) return false;

return true;
Expand Down
3 changes: 0 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ async function Main(){

await writeFile(FILE_NAME_GITHUB_README, GENERAL_README);


console.log("End . . .");
return 0;
// Commit changes and force push
group("Commit & Push -> " + checkResults.branch);
successful = await GithubCommitAndPush(checkResults.branch, checkResults.version, checkResults.isPreview);
Expand Down

0 comments on commit 5a123af

Please sign in to comment.