gitmark 0.0.32 → 0.0.33

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.
Files changed (2) hide show
  1. package/bin/git-mark +20 -4
  2. package/package.json +1 -1
package/bin/git-mark CHANGED
@@ -22,6 +22,15 @@ globalThis.data = {
22
22
  }
23
23
 
24
24
  // FUNCTIONS
25
+ function getConfig(key) {
26
+ try {
27
+ var cmd = `git config ${key}`
28
+ var secret = execSync(cmd)?.toString()?.replace('\n', '')
29
+ return secret
30
+ } catch (e) {
31
+ }
32
+ }
33
+
25
34
  const options = {
26
35
  repo: './',
27
36
  fields: ['subject', 'authorName', 'authorDate'],
@@ -242,7 +251,14 @@ var hex = `1234`
242
251
  // console.log('signrawtransaction', keyPair1.toWIF())
243
252
  console.log(`signrawtransaction ${hex} null '["${keyPair1.toWIF()}"]'`)
244
253
  console.log('sendrawtransaction')
245
- console.log(
246
- `bin/tx.sh ${lastCommit[0]} ${lastCommit[1]
247
- } ${address} ${nextfee} ${keyPair1.toWIF()}`
248
- )
254
+
255
+ var txexe = getConfig('gitmark.txexe')
256
+ var txcommand = `bin/tx.sh ${lastCommit[0]} ${lastCommit[1]} ${address} ${nextfee} ${keyPair1.toWIF()}`
257
+ console.log(txcommand)
258
+
259
+ if (txexe && argv.send) {
260
+ console.log('auto send tx detected ... trying:')
261
+ var newtx = $(txexe + ' ' + txcommand)
262
+ console.log('git commit --allow-empty -m' + ' ' + newtx.toString())
263
+ console.log('git push origin gh-pages')
264
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitmark",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "description": "gitmark",
5
5
  "main": "index.js",
6
6
  "scripts": {