mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-08 05:31:25 +00:00
meshtasticd-debian: Cleanup debian versioning (#5758)
This commit is contained in:
parent
892e0922ff
commit
2f552d15e5
19
.github/workflows/build_debian_src.yml
vendored
19
.github/workflows/build_debian_src.yml
vendored
@ -43,25 +43,24 @@ jobs:
|
|||||||
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||||
id: gpg
|
id: gpg
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
working-directory: meshtasticd
|
||||||
|
run: |
|
||||||
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
- name: Fetch libdeps, package debian source
|
- name: Fetch libdeps, package debian source
|
||||||
working-directory: meshtasticd
|
working-directory: meshtasticd
|
||||||
run: debian/ci_pack_sdeb.sh
|
run: debian/ci_pack_sdeb.sh
|
||||||
env:
|
env:
|
||||||
SERIES: ${{ inputs.series }}
|
SERIES: ${{ inputs.series }}
|
||||||
GPG_KEY_ID: ${{ steps.gpg.outputs.keyid }}
|
GPG_KEY_ID: ${{ steps.gpg.outputs.keyid }}
|
||||||
REVISION: ${{ github.sha }}
|
PKG_VERSION: ${{ steps.version.outputs.deb }}
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
working-directory: meshtasticd
|
|
||||||
run: |
|
|
||||||
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-debian-${{ steps.version.outputs.long }}-${{ inputs.series }}-src
|
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
meshtasticd_${{ steps.version.outputs.short }}*
|
meshtasticd_${{ steps.version.outputs.deb }}*
|
||||||
|
21
.github/workflows/package_ppa.yml
vendored
21
.github/workflows/package_ppa.yml
vendored
@ -50,14 +50,13 @@ jobs:
|
|||||||
- name: Get release version string
|
- name: Get release version string
|
||||||
working-directory: meshtasticd
|
working-directory: meshtasticd
|
||||||
run: |
|
run: |
|
||||||
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-debian-${{ steps.version.outputs.long }}-${{ inputs.series }}-src
|
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
@ -66,18 +65,4 @@ jobs:
|
|||||||
- name: Publish with dput
|
- name: Publish with dput
|
||||||
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
||||||
run: |
|
run: |
|
||||||
dput ppa:meshtastic/meshtastic-daily meshtasticd_${{ steps.version.outputs.short }}_source.changes
|
dput ppa:meshtastic/meshtastic-daily meshtasticd_${{ steps.version.outputs.deb }}~${{ inputs.series }}_source.changes
|
||||||
|
|
||||||
# - name: Publish PPA
|
|
||||||
# if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
|
||||||
# uses: yuezk/publish-ppa-package@v2
|
|
||||||
# with:
|
|
||||||
# # See https://launchpad.net/~meshtastic/+archive/ubuntu/meshtastic-daily
|
|
||||||
# repository: "meshtastic/meshtastic-daily"
|
|
||||||
# gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
|
||||||
# gpg_passphrase: ""
|
|
||||||
# tarball: "meshtasticd_${{ steps.version.outputs.short }}.tar.xz"
|
|
||||||
# deb_email: "github-actions[bot]@users.noreply.github.com"
|
|
||||||
# deb_fullname: "github-actions[bot]"
|
|
||||||
# # Supported Ubuntu versions
|
|
||||||
# series: "plucky oracular noble jammy"
|
|
||||||
|
@ -10,6 +10,7 @@ def readProps(prefsLoc):
|
|||||||
version = dict(config.items("VERSION"))
|
version = dict(config.items("VERSION"))
|
||||||
verObj = dict(
|
verObj = dict(
|
||||||
short="{}.{}.{}".format(version["major"], version["minor"], version["build"]),
|
short="{}.{}.{}".format(version["major"], version["minor"], version["build"]),
|
||||||
|
deb="unset",
|
||||||
long="unset",
|
long="unset",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -27,13 +28,13 @@ def readProps(prefsLoc):
|
|||||||
# if isDirty:
|
# if isDirty:
|
||||||
# # short for 'dirty', we want to keep our verstrings source for protobuf reasons
|
# # short for 'dirty', we want to keep our verstrings source for protobuf reasons
|
||||||
# suffix = sha + "-d"
|
# suffix = sha + "-d"
|
||||||
verObj["long"] = "{}.{}.{}.{}".format(
|
verObj["long"] = "{}.{}".format(verObj["short"], suffix)
|
||||||
version["major"], version["minor"], version["build"], suffix
|
verObj["deb"] = "{}-ppa{}".format(verObj["short"], sha)
|
||||||
)
|
|
||||||
except:
|
except:
|
||||||
# print("Unexpected error:", sys.exc_info()[0])
|
# print("Unexpected error:", sys.exc_info()[0])
|
||||||
# traceback.print_exc()
|
# traceback.print_exc()
|
||||||
verObj["long"] = verObj["short"]
|
verObj["long"] = verObj["short"]
|
||||||
|
verObj["deb"] = "{}-ppa".format(verObj["short"])
|
||||||
|
|
||||||
# print("firmware version " + verStr)
|
# print("firmware version " + verStr)
|
||||||
return verObj
|
return verObj
|
||||||
|
5
debian/ci_pack_sdeb.sh
vendored
5
debian/ci_pack_sdeb.sh
vendored
@ -7,11 +7,10 @@ export PLATFORMIO_PACKAGES_DIR=pio/packages
|
|||||||
platformio pkg install -e native
|
platformio pkg install -e native
|
||||||
|
|
||||||
package=$(dpkg-parsechangelog --show-field Source)
|
package=$(dpkg-parsechangelog --show-field Source)
|
||||||
pkg_version=$(dpkg-parsechangelog --show-field Version | cut -d- -f1)
|
|
||||||
|
|
||||||
rm -rf debian/changelog
|
rm -rf debian/changelog
|
||||||
dch --create --distribution $SERIES --package $package --newversion $pkg_version-ppa${REVISION::7}~$SERIES \
|
dch --create --distribution $SERIES --package $package --newversion $PKG_VERSION~$SERIES \
|
||||||
"GitHub Actions Automatic packaging for $SERIES"
|
"GitHub Actions Automatic packaging for $PKG_VERSION~$SERIES"
|
||||||
|
|
||||||
# Build the source deb
|
# Build the source deb
|
||||||
debuild -S -k$GPG_KEY_ID
|
debuild -S -k$GPG_KEY_ID
|
||||||
|
Loading…
Reference in New Issue
Block a user