Skip to content

Commit

Permalink
Merge branch 'vatsimnetwork:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
catchingstrays authored Sep 13, 2024
2 parents 83a3868 + a3bbf6b commit a0a2655
Show file tree
Hide file tree
Showing 22 changed files with 707 additions and 305 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Compile TRACON Boundaries

name: Build Boundaries Only
on:
workflow_dispatch:
push:
tags:
- "v*"

jobs:
compile:
Expand All @@ -20,18 +16,9 @@ jobs:

- name: Compile boundary files
run: node compiler.js

- name: Tag
run: echo ${{ github.sha }} > Release.txt

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: TRACONBoundaries
path: TRACONBoundaries.geojson

- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: TRACONBoundaries.geojson
40 changes: 40 additions & 0 deletions .github/workflows/enforce_dir_structure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Enforce Directory Structure

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
enforce_dir_structure:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate Directory Structure
run: |
echo "Validating directory structure..."
for dir in Boundaries/*; do
if [ -d "$dir" ]; then
id=$(basename "$dir")
json_files=("$dir"/*.json)
if [ ${#json_files[@]} -eq 0 ]; then
echo "::error file=$dir::No JSON files found in directory $dir"
exit 1
fi
for json_file in "${json_files[@]}"; do
if [[ ! "$json_file" =~ ^$dir/[^/]+\.json$ ]]; then
echo "::error file=$json_file::Invalid JSON file name or location: $json_file"
exit 1
fi
done
else
echo "::error file=$dir::Invalid directory: $dir"
exit 1
fi
done
echo "Directory structure is valid."
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: json-yaml-validate
name: Validate JSON and YAML files

on:
push:
branches:
Expand All @@ -18,6 +19,6 @@ jobs:

- name: json-yaml-validate
id: json-yaml-validate
uses: GrantBirki/[email protected] # replace with the latest version
uses: GrantBirki/[email protected]
with:
comment: "true" # enable comment mode
84 changes: 84 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Version bump, build and release
on:
workflow_dispatch:
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Compile Master Boundary File
run: node compiler.js

- name: Upload Master Boundary File
uses: actions/upload-artifact@v4
with:
name: TRACONBoundaries
path: TRACONBoundaries.geojson

create_release:
needs: compile
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Download Master Boundary File
uses: actions/download-artifact@v4
with:
name: TRACONBoundaries
path: .

- name: Tag Version
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: patch
prefix: "v"
message: "Tag version to v${steps.tag_version.outputs.new_version}"

- name: Fetch all tags
run: git fetch --tags

- name: Generate Changelog
id: generate_changelog
run: |
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
NEW_TAG=${{ steps.tag_version.outputs.new_version }}
if [ -z "$PREVIOUS_TAG" ]; then
echo "No previous tag found. Generating changelog from the beginning of the repository."
CHANGELOG=$(git log --pretty=format:"* %s (%an)")
else
echo "Previous tag: $PREVIOUS_TAG"
echo "New tag: $NEW_TAG"
CHANGELOG=$(git log $PREVIOUS_TAG..HEAD --pretty=format:"* %s (%an)")
fi
echo "$CHANGELOG" > CHANGELOG.md
shell: bash

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.tag_version.outputs.new_version }}
release_name: Release v${{ steps.tag_version.outputs.new_version }}
body_path: CHANGELOG.md
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./TRACONBoundaries.geojson
asset_name: TRACONBoundaries.geojson
asset_content_type: application/octet-stream
20 changes: 0 additions & 20 deletions .github/workflows/tagandrelease.yml

This file was deleted.

3 changes: 1 addition & 2 deletions Boundaries/ENCN/ENCN.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"properties": {
"id": "ENCN",
"prefix": [
"ENCN",
"ENRC"
"ENCN"
],
"name": "Kjevik Approach"
},
Expand Down
3 changes: 1 addition & 2 deletions Boundaries/ENOL/ENOL.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"properties": {
"id": "ENOL",
"prefix": [
"ENOL",
"ENRC"
"ENOL"
],
"name": "Ørland Approach"
},
Expand Down
2 changes: 1 addition & 1 deletion Boundaries/FARRIS/FARRIS.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "FARRIS",
"prefix": [
"ENTO",
"ENRC"
"ENRY"
],
"name": "Farris Approach"
},
Expand Down
67 changes: 67 additions & 0 deletions Boundaries/LXGB/LXGB.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"type": "Feature",
"properties": {
"id": "LXGB",
"prefix": [
"LXGB"
],
"name": "Gibraltar Radar"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-5.3852777777777785,
36.153055555555554
],
[
-5.316944444444444,
36.153055555555554
],
[
-5.276666666666666,
36.149166666666666
],
[
-5.2725,
36.172777777777775
],
[
-4.893333333333333,
36.172777777777775
],
[
-4.893333333333333,
36.10388888888889
],
[
-5.328483333333333,
36.10039777777778
],
[
-5.342651666666667,
36.09196777777778
],
[
-5.365599722222222,
36.09878555555556
],
[
-5.37376,
36.11817944444444
],
[
-5.382837222222221,
36.13403888888889
],
[
-5.3852777777777785,
36.153055555555554
]
]
]
]
}
}
3 changes: 1 addition & 2 deletions Boundaries/MORE/MORE.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"id": "MORE",
"prefix": [
"ENAL",
"ENKB",
"ENRC"
"ENKB"
],
"name": "Møre Approach"
},
Expand Down
71 changes: 71 additions & 0 deletions Boundaries/SBES/SBES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"type": "Feature",
"properties": {
"id": "SBES",
"prefix": ["SBES"],
"name": "Aldeia Control"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[-42.1272,-22.3672],
[-42.1271,-22.3731],
[-42.1264,-22.3801],
[-42.1255,-22.387],
[-42.1245,-22.394],
[-42.1233,-22.4009],
[-42.122,-22.4078],
[-42.1206,-22.4147],
[-42.1189,-22.4215],
[-42.1172,-22.4283],
[-42.1152,-22.4351],
[-42.1131,-22.4418],
[-42.1109,-22.4485],
[-42.1085,-22.4551],
[-42.106,-22.4617],
[-42.1033,-22.4683],
[-42.1005,-22.4748],
[-42.0975,-22.4812],
[-42.0944,-22.4876],
[-42.0911,-22.4939],
[-42.0877,-22.5002],
[-42.0841,-22.5063],
[-42.0804,-22.5124],
[-42.0766,-22.5185],
[-42.0727,-22.5244],
[-42.0686,-22.5303],
[-42.0643,-22.5361],
[-42.06,-22.5418],
[-42.0555,-22.5475],
[-42.0509,-22.553],
[-42.0461,-22.5585],
[-42.0413,-22.5638],
[-42.0363,-22.5691],
[-42.0312,-22.5743],
[-42.026,-22.5793],
[-42.0207,-22.5843],
[-42.0152,-22.5891],
[-42.0097,-22.5939],
[-42.004,-22.5985],
[-41.9983,-22.6031],
[-41.9924,-22.6075],
[-41.9865,-22.6118],
[-41.9804,-22.616],
[-41.9743,-22.62],
[-41.9681,-22.624],
[-41.9622,-22.6275],
[-41.899167,-22.651944],
[-41.791389,-22.694167],
[-41.542,-22.7922],
[-42.0003,-23.5005],
[-42.5005,-23.5005],
[-42.5005,-23.0005],
[-42.4003,-22.6505],
[-42.1272,-22.3672]
]
]
]
}
}
Loading

0 comments on commit a0a2655

Please sign in to comment.