Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 18 additions & 50 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,32 +69,16 @@ jobs:
with:
name: acars-package

- uses: BetaHuhn/do-spaces-action@latest
with:
access_key: ${{ secrets.SPACE_ACCESS_KEY}}
secret_key: ${{ secrets.SPACE_SECRET_KEY }}
space_name: ${{ secrets.SPACE_NAME }}
space_region: ${{ secrets.SPACE_REGION }}
cdn_domain: ${{ secrets.SPACE_CDN_DOMAIN }}
source: stable.zip
out_dir: scripts

- name: install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: purge CDN cache
continue-on-error: true
- name: upload to Bunny storage
env:
AWS_ACCESS_KEY_ID: acars
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUNNY_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
# AWS CLI v2.23+ sends checksum headers many S3-compatible stores reject
AWS_REQUEST_CHECKSUM_CALCULATION: when_required
run: |
CDN_ID=$(doctl compute cdn list --format ID,Origin --no-header \
| grep -F "${{ secrets.SPACE_NAME }}.${{ secrets.SPACE_REGION }}.digitaloceanspaces.com" \
| awk '{print $1}')
if [ -z "$CDN_ID" ]; then
echo "No CDN endpoint found for this space, skipping purge"
exit 0
fi
doctl compute cdn flush "$CDN_ID" --files "scripts/stable.zip"
aws s3 cp stable.zip s3://acars/scripts/stable.zip \
--endpoint-url https://ny-s3.storage.bunnycdn.com

#
# Manually triggered: bump the version, tag it, and publish a GitHub release
Expand Down Expand Up @@ -145,32 +129,16 @@ jobs:
filename: '../stable.zip'
exclusions: ''

- uses: BetaHuhn/do-spaces-action@latest
with:
access_key: ${{ secrets.SPACE_ACCESS_KEY}}
secret_key: ${{ secrets.SPACE_SECRET_KEY }}
space_name: ${{ secrets.SPACE_NAME }}
space_region: ${{ secrets.SPACE_REGION }}
cdn_domain: ${{ secrets.SPACE_CDN_DOMAIN }}
source: stable.zip
out_dir: scripts

- name: install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: purge CDN cache
continue-on-error: true
- name: upload to Bunny storage
env:
AWS_ACCESS_KEY_ID: acars
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUNNY_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
# AWS CLI v2.23+ sends checksum headers many S3-compatible stores reject
AWS_REQUEST_CHECKSUM_CALCULATION: when_required
run: |
CDN_ID=$(doctl compute cdn list --format ID,Origin --no-header \
| grep -F "${{ secrets.SPACE_NAME }}.${{ secrets.SPACE_REGION }}.digitaloceanspaces.com" \
| awk '{print $1}')
if [ -z "$CDN_ID" ]; then
echo "No CDN endpoint found for this space, skipping purge"
exit 0
fi
doctl compute cdn flush "$CDN_ID" --files "scripts/stable.zip"
aws s3 cp stable.zip s3://acars/scripts/stable.zip \
--endpoint-url https://ny-s3.storage.bunnycdn.com

- name: Create GitHub release
uses: softprops/action-gh-release@v2
Expand Down
2 changes: 1 addition & 1 deletion src/aircraft/Toliss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default class Toliss extends AircraftConfig {
return value[0] === 1 && value[1] === 1
}

APU(value: number): FeatureState {
apu(value: number): FeatureState {
return value === 1
}

Expand Down
2 changes: 1 addition & 1 deletion src/aircraft/Toliss_A330.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class Toliss_A330 extends AircraftConfig {
return value[3] == 1 || value[3] == 2
}

APU(value: number): FeatureState {
apu(value: number): FeatureState {
return value == 1
}
}
3 changes: 3 additions & 0 deletions src/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ export interface Telemetry {
slewActive: boolean
/** If the stall warning is on in the sim */
stallWarning: boolean
/** The flight phase/state at this tick. Carried on every telemetry snapshot so
* state changes are observable as a prev->curr transition (curr.state != prev.state). */
state: PirepState
/** Boolean for lights */
strobeLights: boolean
/** Boolean for lights */
Expand Down
Loading