Skip to content

Commit

Permalink
correct version in modify and delette release at synchronize
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwenou committed Sep 11, 2023
1 parent 56735c2 commit 2f0cc33
Show file tree
Hide file tree
Showing 150 changed files with 22 additions and 3,943 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ DocProject/Help/html

# Click-Once directory
publish/
Published/

# Publish Web Output
*.[Pp]ublish.xml
Expand Down
12 changes: 12 additions & 0 deletions BIA.ToolKit.Application/Services/RepositoryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ public bool CheckRepoFolder(RepositorySettings repository, bool inSync)
return true;
}

public void CleanVersionFolder(RepositorySettings repository)
{
if (repository.Versioning == VersioningType.Release)
{
var releasePath = AppSettings.AppFolderPath + "\\" + repository.Name;
if (Directory.Exists(releasePath))
{
Directory.Delete(releasePath,true);
}
}
}

public string PrepareVersionFolder (RepositorySettings repository, string version)
{
if (repository.Versioning == VersioningType.Folder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ public partial class CustomsRepoTemplateUC : Window
{
GitService gitService;
public RepositoriesSettingsVM vm;
private RepositoryService repositoryService;

public CustomsRepoTemplateUC(GitService gitService)
public CustomsRepoTemplateUC(GitService gitService, RepositoryService repositoryService)
{
InitializeComponent();
this.gitService = gitService;
this.repositoryService = repositoryService;
vm = (RepositoriesSettingsVM) base.DataContext;
}

Expand Down Expand Up @@ -89,6 +91,7 @@ private void synchronizeButton_Click(object sender, RoutedEventArgs e)
if (vm.RepositorySettings != null)
{
_ = gitService.Synchronize(vm.RepositorySettings);
this.repositoryService.CleanVersionFolder(vm.RepositorySettings);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion BIA.ToolKit/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<TextBox Text="{Binding Settings_CompanyFiles_LocalFolderPath}" IsEnabled="{Binding Settings.CompanyFiles.UseLocalFolder}" HorizontalAlignment="Left" Margin="37,0,0,63" TextWrapping="Wrap" Width="310" Grid.Column="3" Height="18" VerticalAlignment="Bottom"/>
<Button Content="..." IsEnabled="{Binding Settings.CompanyFiles.UseLocalFolder}" HorizontalAlignment="Left" Margin="347,0,0,62" RenderTransformOrigin="0.429,2.91" Width="35" Grid.Column="3" Click="CompanyFilesLocalFolderBrowse_Click" Height="20" VerticalAlignment="Bottom"/>
<Button Content="Synchronize" HorizontalAlignment="Left" Margin="89,0,0,26" RenderTransformOrigin="0.429,2.91" Width="206" Grid.Column="3" Name="CompanyFilesLocalFolderSync" Click="CompanyFilesLocalFolderSync_Click" Height="20" VerticalAlignment="Bottom"/>
<Label Content="V1.4.1" Grid.Column="3" Margin="0,2,0,0" VerticalAlignment="Top" Foreground="#FFF0F0F0" HorizontalAlignment="Right"/>
<Label Content="V1.4.2" Grid.Column="3" Margin="0,2,0,0" VerticalAlignment="Top" Foreground="#FFF0F0F0" HorizontalAlignment="Right"/>
</Grid>
</TabItem>
<TabItem Header="Create project" Selector.Selected="OnTabCreateSelected">
Expand Down
4 changes: 3 additions & 1 deletion BIA.ToolKit/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ private async void BIATemplateLocalFolderSync_Click(object sender, RoutedEventAr
Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;

await this.gitService.Synchronize(_viewModel.Settings.BIATemplateRepository);
this.repositoryService.CleanVersionFolder(_viewModel.Settings.BIATemplateRepository);

Mouse.OverrideCursor = System.Windows.Input.Cursors.Arrow;
BIATemplateLocalFolderSync.IsEnabled = true;
Expand All @@ -205,6 +206,7 @@ private async void CompanyFilesLocalFolderSync_Click(object sender, RoutedEventA
Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;

await this.gitService.Synchronize(_viewModel.Settings.CompanyFiles);
this.repositoryService.CleanVersionFolder(_viewModel.Settings.CompanyFiles);

Mouse.OverrideCursor = System.Windows.Input.Cursors.Arrow;
CompanyFilesLocalFolderSync.IsEnabled = true;
Expand Down Expand Up @@ -351,7 +353,7 @@ private void btnFileGenerator_Generate_Click(object sender, RoutedEventArgs e)

private void CustomRepoTemplate_Click(object sender, RoutedEventArgs e)
{
var dialog = new CustomsRepoTemplateUC(gitService) { Owner = this };
var dialog = new CustomsRepoTemplateUC(gitService, repositoryService) { Owner = this };

// Display the dialog box and read the response
bool? result = dialog.ShowDialog(_viewModel.Settings.CustomRepoTemplates);
Expand Down
2 changes: 1 addition & 1 deletion BIA.ToolKit/UserControls/ModifyProjectUC.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<Label Content="Project Folder" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="White" Margin="384,0,0,0"/>
<ComboBox ItemsSource="{Binding Projects}" SelectedValue="{Binding Folder}" HorizontalAlignment="Left" Margin="402,23,0,0" VerticalAlignment="Top" Width="120" SelectionChanged="ModifyProject_SelectionChanged"/>
<Label Content="Version detected : " HorizontalAlignment="Left" Margin="542,0,0,0" VerticalAlignment="Top" Foreground="White"/>
<Label Content="{Binding FrameworkVersion}" HorizontalAlignment="Left" Margin="676,0,0,0" VerticalAlignment="Top" Foreground="White" Width="25"/>
<Label Content="{Binding FrameworkVersion}" HorizontalAlignment="Left" Margin="676,0,0,0" VerticalAlignment="Top" Foreground="White" Width="84"/>
<Label Content="Project name detected : " HorizontalAlignment="Left" Margin="542,15,0,0" VerticalAlignment="Top" Foreground="White"/>
<Label Content="{Binding Name}" HorizontalAlignment="Left" Margin="675,15,0,0" VerticalAlignment="Top" Foreground="White"/>
<Label Content="Company detected : " HorizontalAlignment="Left" Margin="542,31,0,0" VerticalAlignment="Top" Foreground="White" Grid.RowSpan="2"/>
Expand Down
4 changes: 0 additions & 4 deletions Published/.gitattributes

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 2f0cc33

Please sign in to comment.