I ran into this a couple of times where the debug output didn't seem to
make any sense until I understood that libgit simply didn't give me
detailed error info.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is not a great way to load-balance, but it works and doesn't require
high end hardware on the backend.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Change the name of the `GITHUB_WORKSPACE` environment variable in the
android build script to `OUTPUT_DIR`, which is more intuitive when the
script is used for local builds.
Also test if the variable is defined before attempting to use it as the
target of the build output.
Signed-off-by: Michael Keller <github@ike.ch>
This is the oldest format I know for SmartTrak databases. Probably the
first one. It just supports one tank, only air/nitrox and the format of
the database is dramatically different from the other two formats known
to me.
It has different tables, and the "Dives" table differs a lot from newer
versions.
I don't think it's worth to give support for this format, as newer
versions of SmartTrak software automatically comvert the oldest format
to newer one. Thus, finding a lot of this format files is not expected
except from some corner cases of users who had not updated their
SmartTrak software for years now.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Original mdbtools developer gave up the project some time ago, and it's
continued with his permission in a forked repo:
https://github.com/mdbtools/mdbtools.git
There was a nasty bug in libmdb, triggered under some rare circustances,
that is solved in the new repo which is, BTW, under current
development.
Move our scripts to the new repo and set our working version to the
latest release tag, currently, "v1.0.0"
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Prevent attempts to generate a build number for pull request builds as
they will fail due to the lack of permissions on the
`subsurface/nightly-builds` repository.
Signed-off-by: Michael Keller <github@ike.ch>
The necessary keys to do so aren't available (and of course we don't try
to post a release on pull requests, anyway).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
What a pain. It turns out that github.run_number is counting the number of
times a specific workflow has been run - but that's different for different
workflows, so using that won't get us a single tag with all the corresponding
build artifacts. And sadly I can't find a simple atomic way to increase a
GitHUb repo variable, so I came up with this somewhat convoluted dance, using
the the fact that a push to an existing brach that isn't a fast-forward will
fail.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix the 'Snap USNs' action.
According to https://bugs.launchpad.net/lazr.restfulclient/+bug/2041407
the an incompatibility is introduced by the move from python 3.11 to
3.12, and a workaround is to pin the version to 3.11.
Signed-off-by: Michael Keller <github@ike.ch>
Add a warning to the initial login screen telling the user that the
first synchronisation can take a few minutes.
Fixes a misunderstanding pointed out in a recent post in the Subsurface
mailing list.
Signed-off-by: Michael Keller <github@ike.ch>
This way our ongoing releases will be in their own repo.
Also, use a nicer date format (at least I think this looks nicer).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need some additional options when building the package, so let that script
handle the details and use the generic build script mainly for the dependencies.
Also let's not mix building for testing and building the DMG - just so I can
stay somewhat sane.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The 'git describe' command finds the most recent tag instead of the
SHA1. When trying to build from a repository without any tags, for
example in a fork, this causes the build to fail.
Use the '--always' option to fallback to the SHA1 in case no tag is
present.
Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
Pull requests can be triggered by anyone - we should not publish code
that comes in through pull requests to either GitHub releases or
Launchpad, Copr, etc.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It's embarrassing that we kept doing this for so long. Debian and Ubuntu
have had new enough versions of libgit2 for a very long time.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If there are no gas mixes returned by libdivecomputer, we need to default to air. The previous commit would have defaulted to pure oxygen.
Signed-off-by: Micha WERLE <micha@michaelwerle.com>
During code review, an argument was made to use the bottom gas mix as
the mix to fill additional tanks with instead of the last mix reported
by the dive computer.
This change implements `get_deeper_gasmix` which compares two gas mixes
and returns the one with the lower MOD. This comparison does not perform
actual MOD calculations but only performs a relative oxygen and helium
content comparison.
Instead of saving the last gas mix and assigning it to additional tanks,
a `bottom_gas` mix is saved and assigned instead.
Signed-off-by: Micha WERLE <micha@michaelwerle.com>
Reverted "optimisation" based on code feedback.
Firstly, it's implementation-defined whether or not a stack frame is created for sub-scopes, secondly any optimisation is questionable regardless, and thirdly it was felt that it makes the code harder to understand.
Signed-off-by: Micha WERLE <micha@michaelwerle.com>
Instead of defaulting to air when we run out of gas mixes to assign to
cylinders, use the last gas mix provided by the dive computer.
If no gas mixes are provided at all, then default to air.
This prevents Subsurface from "inventing" gas mixes which are not
reported by the dive computer. It also works very nicely with a sidemount
configuration where the dive computer typically reports two cylinders but
only a single gas mix.
Signed-off-by: Micha WERLE <micha@michaelwerle.com>