@@ -56,6 +56,7 @@ const getConfig = async ({
56
56
const isRoot = root === path
57
57
const isLatest = version === LATEST_VERSION
58
58
const isDogFood = pkg . name === NAME
59
+ const isForce = process . argv . includes ( '--force' )
59
60
60
61
// this is written to ci yml files so it needs to always use posix
61
62
const pkgRelPath = makePosix ( relative ( root , path ) )
@@ -111,16 +112,17 @@ const getConfig = async ({
111
112
pkgName : pkg . name ,
112
113
pkgNameFs : pkg . name . replace ( / \/ / g, '-' ) . replace ( / @ / g, '' ) ,
113
114
pkgRelPath : pkgRelPath ,
114
- // force changes if we are dogfooding this repo or with force argv
115
- // XXX: setup proper cli arg parsing
116
- isForce : isDogFood || process . argv . includes ( '--force' ) ,
115
+ // booleans to control application of updates
116
+ isForce ,
117
+ isDogFood,
117
118
isLatest,
118
- needsUpdate : ! isLatest ,
119
+ // needs update if we are dogfooding this repo, with force argv, or its
120
+ // behind the current version
121
+ needsUpdate : isForce || isDogFood || ! isLatest ,
119
122
// templateoss specific values
120
123
__NAME__ : NAME ,
121
124
__CONFIG_KEY__ : CONFIG_KEY ,
122
125
__VERSION__ : LATEST_VERSION ,
123
- __DOGFOOD__ : isDogFood ,
124
126
}
125
127
126
128
// merge the rest of base and pkg content to make the
0 commit comments