Skip to content

Commit 2e9858d

Browse files
committed
ops(ci): conventional-commits based release versions
- added enforcing of conventional commits - project version is now set by axion-release gradle plugin, configured to extract the version based on the commit history see https://axion-release-plugin.readthedocs.io/en/latest/
1 parent b025615 commit 2e9858d

File tree

3 files changed

+19
-209
lines changed

3 files changed

+19
-209
lines changed

.github/actions/detect-modified-projects/dist/index.js

Lines changed: 0 additions & 80 deletions
This file was deleted.

.github/actions/detect-modified-projects/src/index.ts

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,28 @@ function isShallowRepo(): boolean {
2424
}
2525

2626
function ensureHistoryAndTags(): void {
27-
if (isShallowRepo()) {
28-
core.info('Shallow repo detected → fetching unshallow + tags');
29-
// If remote is missing (e.g., local testing), this may fail; let it throw to surface the problem.
30-
sh('git fetch --unshallow --tags --force');
27+
// Detect shallow/non-shallow
28+
let isShallow: boolean;
29+
try {
30+
const out = execSync('git rev-parse --is-shallow-repository', { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'pipe'] }).trim();
31+
isShallow = out === 'true';
32+
} catch {
33+
// If the command isn't supported (very old git), assume not shallow
34+
isShallow = false;
35+
}
36+
37+
core.info(`Repo shallow: ${isShallow}`);
38+
39+
if (isShallow) {
40+
// Shallow checkout → unshallow and fetch tags
41+
core.info('Fetching to unshallow repository and include tags…');
42+
execSync('git fetch --unshallow --tags --force', { encoding: 'utf-8' });
3143
} else {
32-
core.info('Complete repo detectedfetching tags/pruning');
33-
// Keep tags up to date even on full clones
34-
sh('git fetch --tags --force --prune');
44+
// Already completejust refresh tags and prune
45+
core.info('Repository already complete; fetching tags and pruning…');
46+
execSync('git fetch --tags --force --prune', { encoding: 'utf-8' });
3547
}
3648
}
37-
3849
/**
3950
* Determine a sensible base for diff:
4051
* - On pull_request events: origin/<base_branch>

.github/actions/execute-gradle-tasks-on-projects/dist/index.js

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)