Lutz Roeder před 3 roky
rodič
revize
179aa95c35
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      package.js

+ 4 - 1
package.js

@@ -177,9 +177,12 @@ const publish = async (target) => {
         case 'cask': {
             write('publish cask');
             const authorization = 'Authorization: token ' + GITHUB_TOKEN;
+            write('delete github homebrew-cask');
             exec('curl -s -H "' + authorization + '" -X "DELETE" https://api.github.com/repos/' + GITHUB_USER + '/homebrew-cask 2>&1 > /dev/null');
             await sleep(4000);
+            write('fork github homebrew-cask');
             exec('curl -s -H "' + authorization + '"' + " https://api.github.com/repos/Homebrew/homebrew-cask/forks -d '' 2>&1 > /dev/null");
+            await sleep(4000);
             rm('dist', 'homebrew-cask');
             exec('git clone --depth=2 https://x-access-token:' + GITHUB_TOKEN + '@github.com/' + GITHUB_USER + '/homebrew-cask.git ./dist/homebrew-cask');
             const repository = 'https://github.com/' + configuration.repository;
@@ -216,7 +219,7 @@ const publish = async (target) => {
             write('delete github winget-pkgs');
             exec('curl -s -H "' + authorization + '" -X "DELETE" https://api.github.com/repos/' + GITHUB_USER + '/winget-pkgs');
             await sleep(4000);
-            write('create github winget-pkgs');
+            write('fork github winget-pkgs');
             exec('curl -s -H "' + authorization + '" https://api.github.com/repos/microsoft/winget-pkgs/forks -d ""');
             rm('dist', 'winget-pkgs');
             await sleep(4000);