Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelio authored Aug 6, 2024
0 parents commit 2ba6d68
Show file tree
Hide file tree
Showing 9 changed files with 217 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
indent_style = space
tab_width = 4
end_of_line = lf

[*.js]
indent_size = 2
tab_width = 2

[{*.yaml,*.yml}]
indent_size = 2
tab_width = 2
53 changes: 53 additions & 0 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'Build'
on:
pull_request:
push:
branches:
- main
jobs:
artifacts:
name : 'Create release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Create a zip from what's in this repo
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
directory: 'dist/'
path: '../'
filename: 'vmsacars_config.zip'
exclusions: '*.git* /*node_modules/* .editorconfig dist'
command: "mkdir -p dist"

# List all the files that have been created
- name: 'List files'
run: |
find dist/ -maxdepth 2 -type f
# You can uncomment the method you want to use to upload
# Create the environment variables appropriately to set it up

# Upload via SFTP. See details here:
# https://github.com/marketplace/actions/sftp-uploader

#- name: SFTP uploader
# uses: wangyucode/[email protected]
# with:
# host: ${{ secrets.SFTP_HOST }}
# password: ${{ secrets.SFTP_PASSWORD }}
# localDir: 'dist'
# remoteDir: ${{ secrets.SFTP_REMOTE_PATH }}

# Upload to an S3 bucket
# https://github.com/actions-marketplace-validations/shallwefootball_upload-s3-action
#- name: Upload S3
# uses: shallwefootball/s3-upload-action@master
# with:
# aws_key_id: ${{ secrets.S3_BUILD_ARTIFACTS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.S3_BUILD_ARTIFACTS_SECRET_ACCESS_KEY}}
# aws_bucket: ${{ secrets.S3_BUCKET_NAME }}
# source_dir: 'dist/'
# destination_dir: ''
95 changes: 95 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea
*.iml

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# vmsACARS Configuration Template

---

## How to use this repo

Create a fork/clone it, and customize it however you want. Also keep an eye on this repo
for updates/changes. For distribution, create a zip file, ensuring that the `manifest.json`
is at the root. You can then upload it, and set the config URL in vmsacars to the URL
of that zip file. A barebones GitHub actions workflow is provided to automate this process.

### manifest.json

The `manifest.json` file contains the locations of the particular items ACARS looks for:

- `aircraft` - The aircraft config Javascript files are
- `rules` - The rules Javascript files are
- `scripts` - the callback scripts are
- `sounds` - Where the sound files are

---

## Distributing

### Using GitHub Actions

GitHub actions is configured to create a zipfile of this repo and then upload it to a location of your choice.
You can uncomment the appropriate section from the `.github/workflows/distribute.yml` file, and add the variables.
The `secrets.XXX` line - the `XXX` key and value need to be added under `Settings -> Secrets and variables -> Actions`

You're also not limited to the included actions, this is just a simple template. You can customize and enhance
it however you wish.

### Uploading manually

Create a zip file with all the contents of this directory.
Empty file added aircraft/empty
Empty file.
15 changes: 15 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "default",
"aircraft": {
"path": "aircraft"
},
"rules": {
"path": "rules"
},
"scripts": {
"path": "sounds"
},
"sounds": {
"path": "sounds"
}
}
Empty file added rules/empty
Empty file.
Empty file added scripts/empty
Empty file.
Empty file added sounds/empty
Empty file.

0 comments on commit 2ba6d68

Please sign in to comment.