File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -121,15 +121,31 @@ tasks:
121121
122122 restore :
123123 desc : Restores the given RESTORE_SNAPSHOT to the SNAPLET_TARGET_DATABASE_URL database.
124- prompt : This will wipe all of the data in the given SNAPLET_TARGET_DATABASE_URL. Are you sure?
125124 silent : true
126125 vars :
126+ RESTORE_OPTIONS : ' {{.RESTORE_OPTIONS | default ""}}'
127127 RESTORE_SNAPSHOT : ' {{.RESTORE_SNAPSHOT | default "latest"}}'
128128 SNAPSHOT_PATH : .snaplet/snapshots/{{.SNAPSHOT_ENV}}/{{.RESTORE_SNAPSHOT}}
129129 requires :
130130 vars :
131131 - SNAPLET_TARGET_DATABASE_URL
132132 cmds :
133133 - printf "\n\n👋 Restoring snapshot from {{.SNAPSHOT_PATH}}\n"
134- - snaplet snapshot restore {{.SNAPSHOT_PATH}}
134+ - snaplet snapshot restore {{.RESTORE_OPTIONS}} {{. SNAPSHOT_PATH}}
135135 - printf "\n\n💯 Restored snapshot from {{.SNAPSHOT_PATH}}\n"
136+
137+ restore:noprompt :
138+ desc : Restores the given RESTORE_SNAPSHOT to the SNAPLET_TARGET_DATABASE_URL database.
139+ silent : true
140+ vars :
141+ RESTORE_SNAPSHOT : ' {{.RESTORE_SNAPSHOT | default "latest"}}'
142+ SNAPSHOT_PATH : .snaplet/snapshots/{{.SNAPSHOT_ENV}}/{{.RESTORE_SNAPSHOT}}
143+ requires :
144+ vars :
145+ - SNAPLET_TARGET_DATABASE_URL
146+ cmds :
147+ - task : restore
148+ vars :
149+ RESTORE_OPTIONS : --yes
150+ RESTORE_SNAPSHOT : " {{.RESTORE_SNAPSHOT}}"
151+ SNAPSHOT_PATH : " {{.SNAPSHOT_PATH}}"
You can’t perform that action at this time.
0 commit comments