Skip to content

Commit

Permalink
Merge pull request #39 from fdm-monster/bugfix/welcome-message-broken
Browse files Browse the repository at this point in the history
bugfixing and fix welcome message is not referring to right FDMM path
  • Loading branch information
davidzwa authored Oct 15, 2023
2 parents 45f78cc + 35794d2 commit d07a7aa
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 30 deletions.
60 changes: 34 additions & 26 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,39 +64,47 @@ jobs:
run: |
source repository/src/config
NOW=$(date +"%Y-%m-%d")
VERSION=${DIST_VERSION}-${NOW}-nightly
IMAGE=monsterpi-$VERSION
TAG=${DIST_VERSION}-${NOW}-nightly
IMAGE=monsterpi-$TAG
cp repository/src/workspace/*.img $IMAGE.img
echo "tag=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "image=$IMAGE" >> $GITHUB_OUTPUT
- name: Show size and tag
run: |
echo "Tag ${{steps.copy.outputs.tag}}"
echo "File size of ${{ steps.copy.outputs.image }}.img"
stat --printf="%s" ${{ steps.copy.outputs.image }}.img
- name: Zip Image
if: github.event_name == 'schedule'
run: |
zip ${{ steps.copy.outputs.image }}.zip ${{ steps.copy.outputs.image }}.img
echo "File size of ${{ steps.copy.outputs.image }}.zip"
stat --printf="%s" ${{ steps.copy.outputs.image }}.zip
- name: Create release
uses: actions/create-release@v1
if: github.event_name == 'schedule'
id: create_release
with:
draft: ${{ github.ref_name == 'develop' }}
prerelease: ${{ contains(env.DIST_VERSION, 'rc') || contains(env.DIST_VERSION, 'unstable') }}
tag_name: ${{ steps.copy.outputs.version }}
release_name: MonsterPi ${{ steps.copy.outputs.image }}
body: "Release notes not added" # ${{ steps.build_changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload server bundle zip
uses: actions/upload-release-asset@v1
if: github.event_name == 'schedule'
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.copy.outputs.image }}.zip
asset_name: ${{ steps.copy.outputs.image }}.zip
asset_content_type: application/zip
# - name: Create release
# uses: actions/create-release@v1
# if: github.event_name == 'schedule'
# id: create_release
# with:
# draft: ${{ github.ref_name == 'develop' }}
# prerelease: ${{ contains(env.DIST_VERSION, 'rc') || contains(env.DIST_VERSION, 'unstable') }}
# tag_name: ${{ steps.copy.outputs.tag }}
# release_name: MonsterPi ${{ steps.copy.outputs.image }}
# body: "Release notes not added" # ${{ steps.build_changelog.outputs.changelog }}
# env:
# GITHUB_TOKEN: ${{ github.token }}
#
# - name: Upload server bundle zip
# uses: actions/upload-release-asset@v1
# if: github.event_name == 'schedule'
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ${{ steps.copy.outputs.image }}.zip
# asset_name: ${{ steps.copy.outputs.image }}.zip
# asset_content_type: application/zip
14 changes: 11 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,33 @@ jobs:
id: copy
run: |
source repository/src/config
VERSION=${DIST_VERSION}
TAG=${DIST_VERSION}
IMAGE=monsterpi-$VERSION
cp repository/src/workspace/*.img $IMAGE.img
echo "tag=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "image=$IMAGE" >> $GITHUB_OUTPUT
- name: Show size and version info
run: |
echo "Tag ${{steps.copy.outputs.tag}}"
echo "File size of ${{ steps.copy.outputs.image }}.img"
stat --printf="%s" ${{ steps.copy.outputs.image }}.img
- name: Zip Image
run: |
zip ${{ steps.copy.outputs.image }}.zip ${{ steps.copy.outputs.image }}.img
echo "File size of ${{ steps.copy.outputs.image }}.zip"
stat --printf="%s" ${{ steps.copy.outputs.image }}.zip
- name: Create release
uses: actions/create-release@v1
id: create_release
with:
draft: ${{ github.ref_name == 'develop' }}
prerelease: ${{ contains(env.DIST_VERSION, 'rc') || contains(env.DIST_VERSION, 'unstable') }}
tag_name: ${{ steps.copy.outputs.version }}
tag_name: ${{ steps.copy.outputs.tag }}
release_name: MonsterPi ${{ steps.copy.outputs.image }}
body: "Release notes not added" # ${{ steps.build_changelog.outputs.changelog }}
env:
Expand Down
2 changes: 1 addition & 1 deletion src/modules/monsterpi/filesystem/home/pi/scripts/welcome
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

_NAME=$(hostname)
_IP=$(hostname -I)
_FDM_MONSTER_VERSION=$(jq -r .version ~/fdm-monster/server/package.json || echo "unknown")
_FDM_MONSTER_VERSION=$(jq -r .version ~/fdm-monster/dist-active/package.json || echo "unknown")
_MONSTERPI_VERSION=$(cat /etc/monsterpi_version || echo "unknown")

echo
Expand Down

0 comments on commit d07a7aa

Please sign in to comment.