Skip to content

Commit

Permalink
fix: use git current branch, which might be main or master
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Aug 31, 2021
1 parent c6c4d8e commit 28cd2a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ exports.configTemplate = async (name, url, description, author) => {
try {
const data = { name, url, description, author }
const files = ['package.json', 'README.md', 'LICENSE']
await Promise.all(files.map(file => replaceInFile(`./src/addons/${name}/${file}`, data)))
await Promise.all(files.map((file) => replaceInFile(`./src/addons/${name}/${file}`, data)))

const repo = git(`./src/addons/${name}`)
await repo.init()
await repo.add('.')
await repo.commit('created addon with voltocli')
await repo.addRemote('origin', url.ssh({ noGitPlus: true }))
await repo.push('origin', 'master')
await repo.push('origin', git.branch().current)
} catch (err) {
console.error('\n' + err)
process.exit(1)
Expand Down Expand Up @@ -142,7 +142,7 @@ const applyToMrsDev = async (name, url) => {
}
}

const applyToJsconfig = async name => {
const applyToJsconfig = async (name) => {
let jsconfig = {}
try {
jsconfig = await loadJsonFile('jsconfig.json')
Expand Down

0 comments on commit 28cd2a5

Please sign in to comment.