Skip to content

Commit

Permalink
added publishing workflow/scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeerickson committed Sep 25, 2020
1 parent ad44aea commit da0b417
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tasks/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Licensed under the MIT license. See LICENSE in the project root for license information.
* -----------------------------------------------------------------------------------------*/

const Messenger = require("@codedungeon/messenger")
const execSync = require("child_process").execSync
const fs = require("fs")
const path = require("path")
const execSync = require("child_process").execSync
const Messenger = require("@codedungeon/messenger")

let version = ""
let name = ""
let TESTING = true
let _TESTING = true

let packageFilename = path.join(__dirname, "..", "package.json")
if (fs.existsSync(packageFilename)) {
Expand All @@ -38,9 +38,13 @@ console.log("")

Messenger.success(`✓ Creating Github tag ${version}`)

if (!TESTING) {
console.log("")

if (!_TESTING) {
let result = execSync('git tag "${version}" && git push --tags --quiet')
console.log(result.toString())
} else {
Messenger.note("*** TESTING MODE Publishing Command Skipped ***")
}

console.log("")
Expand Down

0 comments on commit da0b417

Please sign in to comment.