diff --git a/.github/workflows/Open_PR.yml b/.github/workflows/Open_PR.yml new file mode 100644 index 0000000000..02af5172f1 --- /dev/null +++ b/.github/workflows/Open_PR.yml @@ -0,0 +1,61 @@ +name: Sync v.next with main + +# PRs are completed with squash and merge option - this commit will be cherry-picked for v.next. +on: + push: + branches: + - main + +jobs: + sync_branches: + runs-on: ubuntu-latest + steps: + + # Clone just the main branch of the samples repo. + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: main + fetch-depth: 2 + + # Cherry-pick the most recent commit from main into v.next. + - name: Cherry-pick from main into v.next + env: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + # Configure the bot's git identity. + git config --global user.name "ArcGIS Maps SDK [bot]" + git config --global user.email "arcgis-maps-sdk-bot@esri.com" + + # Store the commit hash of the most recent commit from main. + COMMIT_HASH=$(git rev-parse HEAD) + + # Name the target branch. + SYNC_BRANCH="sync/$COMMIT_HASH" + + # Pull v.next and branch off with the cherry-picked commit. + git fetch --depth=2 origin v.next + git switch v.next + git branch $SYNC_BRANCH + git switch $SYNC_BRANCH + git cherry-pick $COMMIT_HASH + + # Push the new head branch to the remote and try to open a PR. + git push -u origin $SYNC_BRANCH + if ! git diff --quiet v.next; then + echo "Diff detected." + gh pr create \ + --title "[Automated] Sync v.next with main" \ + --body "This PR was automaticaly opened to update v.next with the most recent commit from main." \ + --head "$SYNC_BRANCH" \ + --base "v.next" || CANNOT_OPEN_PR=$? + if [ -n "$CANNOT_OPEN_PR" ]; then + echo "Failed to open PR." + git branch -D $SYNC_BRANCH + else + echo "PR successfully opened." + fi + else + echo "No diff detected." + git branch -D $SYNC_BRANCH + fi diff --git a/src/MAUI/Maui.Samples/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs b/src/MAUI/Maui.Samples/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs index 1fe562bad7..0a44ec5ee0 100644 --- a/src/MAUI/Maui.Samples/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs +++ b/src/MAUI/Maui.Samples/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs @@ -30,7 +30,7 @@ namespace ArcGIS.Samples.AddCustomDynamicEntityDataSource public partial class AddCustomDynamicEntityDataSource { // Path to AIS Traffic Data json file. - private readonly string _localJsonFile = DataManager.GetDataFolder("a8a942c228af4fac96baa78ad60f511f", "AIS_MarineCadastre_SelectedVessels_CustomDataSource.json"); + private readonly string _localJsonFile = DataManager.GetDataFolder("a8a942c228af4fac96baa78ad60f511f", "AIS_MarineCadastre_SelectedVessels_CustomDataSource.jsonl"); public AddCustomDynamicEntityDataSource() { diff --git a/src/WPF/WPF.Viewer/ArcGIS.WPF.Viewer.Net.csproj b/src/WPF/WPF.Viewer/ArcGIS.WPF.Viewer.Net.csproj index 0c9fcb81d1..025095d1fd 100644 --- a/src/WPF/WPF.Viewer/ArcGIS.WPF.Viewer.Net.csproj +++ b/src/WPF/WPF.Viewer/ArcGIS.WPF.Viewer.Net.csproj @@ -2,7 +2,7 @@ WinExe - net8.0-windows10.0.19041.0 + net8.0-windows10.0.19041.0;net472 true true True @@ -18,6 +18,7 @@ 10.0.19041.0 $(DefineConstants);TRACE;NET_CORE_3 1701;1702;CA1416 + AnyCPU @@ -67,6 +68,11 @@ + + + + + PreserveNewest diff --git a/src/WPF/WPF.Viewer/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs b/src/WPF/WPF.Viewer/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs index c9db7fd37c..cf26e698ef 100644 --- a/src/WPF/WPF.Viewer/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs +++ b/src/WPF/WPF.Viewer/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs @@ -33,7 +33,7 @@ namespace ArcGIS.WPF.Samples.AddCustomDynamicEntityDataSource public partial class AddCustomDynamicEntityDataSource { // Path to AIS Traffic Data json file. - private readonly string _localJsonFile = DataManager.GetDataFolder("a8a942c228af4fac96baa78ad60f511f", "AIS_MarineCadastre_SelectedVessels_CustomDataSource.json"); + private readonly string _localJsonFile = DataManager.GetDataFolder("a8a942c228af4fac96baa78ad60f511f", "AIS_MarineCadastre_SelectedVessels_CustomDataSource.jsonl"); public AddCustomDynamicEntityDataSource() { diff --git a/src/WinUI/ArcGIS.WinUI.Viewer/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs b/src/WinUI/ArcGIS.WinUI.Viewer/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs index 75d81a8584..f883640ec6 100644 --- a/src/WinUI/ArcGIS.WinUI.Viewer/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs +++ b/src/WinUI/ArcGIS.WinUI.Viewer/Samples/Layers/AddCustomDynamicEntityDataSource/AddCustomDynamicEntityDataSource.xaml.cs @@ -32,7 +32,7 @@ namespace ArcGIS.WinUI.Samples.AddCustomDynamicEntityDataSource public partial class AddCustomDynamicEntityDataSource { // Path to AIS Traffic Data json file. - private readonly string _localJsonFile = DataManager.GetDataFolder("a8a942c228af4fac96baa78ad60f511f", "AIS_MarineCadastre_SelectedVessels_CustomDataSource.json"); + private readonly string _localJsonFile = DataManager.GetDataFolder("a8a942c228af4fac96baa78ad60f511f", "AIS_MarineCadastre_SelectedVessels_CustomDataSource.jsonl"); public AddCustomDynamicEntityDataSource() {