cob-cli 2.4.3 → 2.4.4

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.
@@ -26,6 +26,7 @@ async function deploy(args) {
26
26
 
27
27
  if(changes.length == 0) {
28
28
  if(!args.force) {
29
+ await cmdEnv.unApplyCurrentCommandEnvironmentChanges()
29
30
  throw new Error("Canceled:".yellow + " nothing todo\n")
30
31
  }
31
32
  console.log(" Just updating deploy information.")
@@ -68,14 +68,16 @@ async function _applySpecific(environmentName) {
68
68
 
69
69
  for( let envSpecificFile of envSpecificFiles ) {
70
70
  let prodFile = envSpecificFile.replace(/\.ENV__.*__/,"")
71
- if(fs.existsSync(prodFile)) {
72
- let backupFile = envSpecificFile.replace(/\.ENV__.*__/,".ENV__ORIGINAL_BACKUP__")
73
- await git().raw(["update-index","--assume-unchanged", prodFile])
74
- fs.renameSync(prodFile, backupFile)
75
- } else {
76
- let deleteFile = envSpecificFile.replace(/\.ENV__.*__/,".ENV__DELETE__")
77
- fs.appendFileSync('.git/info/exclude', "\n" + prodFile)
78
- fs.closeSync(fs.openSync(deleteFile, 'w'));
71
+ let deleteFile = envSpecificFile.replace(/\.ENV__.*__/,".ENV__DELETE__")
72
+ if(!fs.existsSync(deleteFile)) {
73
+ if(fs.existsSync(prodFile)) {
74
+ let backupFile = envSpecificFile.replace(/\.ENV__.*__/,".ENV__ORIGINAL_BACKUP__")
75
+ await git().raw(["update-index","--assume-unchanged", prodFile])
76
+ fs.renameSync(prodFile, backupFile)
77
+ } else {
78
+ fs.appendFileSync('.git/info/exclude', "\n" + prodFile)
79
+ fs.closeSync(fs.openSync(deleteFile, 'w'));
80
+ }
79
81
  }
80
82
  fs.renameSync(envSpecificFile, prodFile)
81
83
  await git().raw(["update-index","--assume-unchanged", envSpecificFile])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cob-cli",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "A command line utility to help Cult of Bits partners develop with higher speed and reusing common code and best practices.",
5
5
  "preferGlobal": true,
6
6
  "repository": {