fix(clustertool): add some tests and verbosity during changelog generation
This commit is contained in:
@@ -112,7 +112,16 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
./temp/clustertool charts genchangelog "$REPO_PATH" "$TEMPLATE_PATH" "$OUTPUT_DIR"
|
./temp/clustertool charts genchangelog "$REPO_PATH" "$TEMPLATE_PATH" "$OUTPUT_DIR"
|
||||||
gzip "$JSON_FILE" --best
|
|
||||||
|
# TODO: Test remove later
|
||||||
|
echo "temp content:"
|
||||||
|
ls ./temp/
|
||||||
|
echo ""
|
||||||
|
echo "rootcontent"
|
||||||
|
ls ./
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
gzip "$JSON_FILE" --best || echo "Compression failed, ignoring..."
|
||||||
|
|
||||||
- name: Fix Pre-Commit issues
|
- name: Fix Pre-Commit issues
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ func (o *ChangelogOptions) Generate() error {
|
|||||||
log.Info().Msgf("Found [%d] active charts in [%s]", len(activeCharts.items), time.Since(start))
|
log.Info().Msgf("Found [%d] active charts in [%s]", len(activeCharts.items), time.Since(start))
|
||||||
|
|
||||||
// Load existing json file
|
// Load existing json file
|
||||||
|
log.Info().Msgf("Loading json %s", o.JSONOutputPath)
|
||||||
if err := changedData.LoadFromFile(o.JSONOutputPath); err != nil {
|
if err := changedData.LoadFromFile(o.JSONOutputPath); err != nil {
|
||||||
return fmt.Errorf("failed to load existing json file, maybe it is not matching the current structure: %w", err)
|
return fmt.Errorf("failed to load existing json file, maybe it is not matching the current structure: %w", err)
|
||||||
}
|
}
|
||||||
@@ -158,6 +159,7 @@ func (o *ChangelogOptions) Generate() error {
|
|||||||
if err := mergeStagingToCurrent(); err != nil {
|
if err := mergeStagingToCurrent(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
log.Info().Msgf("Writhing json to %s", o.JSONOutputPath)
|
||||||
if err := changedData.WriteToFile(o.JSONOutputPath); err != nil {
|
if err := changedData.WriteToFile(o.JSONOutputPath); err != nil {
|
||||||
return fmt.Errorf("error writing json new file: %s", err)
|
return fmt.Errorf("error writing json new file: %s", err)
|
||||||
}
|
}
|
||||||
@@ -171,7 +173,7 @@ func (o *ChangelogOptions) Generate() error {
|
|||||||
// and we add the commits from stagingData to the nearest next version in changelogData
|
// and we add the commits from stagingData to the nearest next version in changelogData
|
||||||
func mergeStagingToCurrent() error {
|
func mergeStagingToCurrent() error {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
log.Info().Msgf("Merging staging to current", )
|
log.Info().Msgf("Merging staging to current")
|
||||||
changedData.mu.Lock()
|
changedData.mu.Lock()
|
||||||
defer changedData.mu.Unlock()
|
defer changedData.mu.Unlock()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user