isaacscript 3.18.1 → 3.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/git.js +3 -2
- package/package.json +1 -1
package/dist/git.js
CHANGED
|
@@ -108,14 +108,15 @@ export function initGitRepository(projectPath, gitRemoteURL, verbose) {
|
|
|
108
108
|
if (gitRemoteURL === undefined) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
execShellString("git init --initial-branch
|
|
111
|
+
execShellString("git init --initial-branch main", verbose, false, projectPath);
|
|
112
|
+
execShell("git", ["remote", "add", "origin", gitRemoteURL], verbose, false, projectPath);
|
|
112
113
|
if (isGitNameAndEmailConfigured(verbose)) {
|
|
113
114
|
execShellString("git add --all", verbose, false, projectPath);
|
|
114
115
|
const isaacScriptCLIVersion = getPackageJSONVersion(REPO_ROOT);
|
|
115
116
|
const commitMessage = `chore: add files from ${PROJECT_NAME} ${isaacScriptCLIVersion} template`;
|
|
116
117
|
execShell("git", ["commit", "--message", commitMessage], verbose, false, projectPath);
|
|
118
|
+
execShellString("git push --set-upstream origin main", verbose, false, projectPath);
|
|
117
119
|
}
|
|
118
|
-
execShell("git", ["remote", "add", "origin", gitRemoteURL], verbose, false, projectPath);
|
|
119
120
|
}
|
|
120
121
|
function isGitNameAndEmailConfigured(verbose) {
|
|
121
122
|
const nameExitStatus = execShellString("git config --global user.name", verbose, true).exitStatus;
|