|
|
@ -1,6 +1,8 @@
|
|
|
|
const AbstractGitState = require('./AbstractGitState')
|
|
|
|
const AbstractGitState = require('./AbstractGitState')
|
|
|
|
|
|
|
|
|
|
|
|
class PullState extends AbstractGitState {
|
|
|
|
class PullState extends AbstractGitState {
|
|
|
|
|
|
|
|
#ran_once = false
|
|
|
|
|
|
|
|
|
|
|
|
static get services() {
|
|
|
|
static get services() {
|
|
|
|
return [...super.services, 'output']
|
|
|
|
return [...super.services, 'output']
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -9,11 +11,12 @@ class PullState extends AbstractGitState {
|
|
|
|
if ( !(await this.check()) ) {
|
|
|
|
if ( !(await this.check()) ) {
|
|
|
|
const repo = await this._repo()
|
|
|
|
const repo = await this._repo()
|
|
|
|
await repo.pull(this._config.target)
|
|
|
|
await repo.pull(this._config.target)
|
|
|
|
|
|
|
|
this.#ran_once = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async check() {
|
|
|
|
async check() {
|
|
|
|
return true // TODO support a better check here
|
|
|
|
return this.#ran_once // TODO support a better check here
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async reverse() {
|
|
|
|
async reverse() {
|
|
|
|