Skip to content

Commit 53a23f2

Browse files
chore: fix gitattributes; guardrail against *.db changes (#957)
* chore: fix gitattributes; guardrail against *.db changes Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com> * Add an additional git clean guardrail Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com> --------- Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
1 parent 8a44a70 commit 53a23f2

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
* text eol=lf
1+
* text eol=lf
2+
*.db -text -eol -working-tree-encoding -merge -diff

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
types: [closed]
66
paths:
77
- '.github/project.yml'
8+
workflow_dispatch: {}
89

910
permissions:
1011
contents: write
@@ -61,6 +62,11 @@ jobs:
6162
run: |
6263
git checkout -b release
6364
mvn -B release:prepare -DperformRelease -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
65+
66+
git restore --staged --worktree -- impl/test/db-samples/** 2>/dev/null || true
67+
git clean -fd -- impl/test/db-samples 2>/dev/null || true
68+
69+
git status --porcelain
6470
cat release.properties
6571
git checkout ${{github.base_ref}}
6672
git rebase release

impl/test/src/test/java/io/serverlessworkflow/impl/test/DBGenerator.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@
2828
import java.nio.file.Files;
2929
import java.nio.file.Path;
3030
import java.util.Map;
31+
import org.slf4j.Logger;
32+
import org.slf4j.LoggerFactory;
3133

3234
public class DBGenerator {
3335

36+
private static final Logger LOG = LoggerFactory.getLogger(DBGenerator.class);
37+
3438
public static void main(String[] args) throws IOException {
3539
runInstance("db-samples/running_v1.db", false);
3640
runInstance("db-samples/suspended_v1.db", true);
3741
}
3842

3943
private static void runInstance(String dbName, boolean suspend) throws IOException {
44+
LOG.info("---> Generating db samples at {}", dbName);
4045
Files.deleteIfExists(Path.of(dbName));
4146
try (PersistenceInstanceHandlers factories =
4247
BytesMapPersistenceInstanceHandlers.builder(new MVStorePersistenceStore(dbName))

0 commit comments

Comments
 (0)