Calling `make dist` on a dirty tree caused an error when trying to use
`git log` with the `-dirty` suffix.
This patch removes any "-dirty" suffix from the argument.
[ci skip]
Previously, the lgi check used the normal Lua interpreter to check if
lgi is installed. However, nothing ensures/requires that awesome is
built against the same Lua version as the Lua interpreter. This means
that if lgi is only available for some Lua version, then the check could
succeed even though awesome would later fail to start. Also, the check
might have failed even though awesome would not have any problems
finding lgi.
This commit replaces lgi-check.sh by a small C program which does the
same thing. This ensures that the same Lua version is used as awesome
will be using.
There are some places that still use the Lua interpreter: Example tests
(run through the Lua interpreter directly) and unit tests (run through
busted). For unit tests, this should not make much of a difference and
example tests might later get similar treatment.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Most of the entries that are marked as "TODO: Get rid of these" were
handled. wibox.layout.align:get_children() never worked (it always
called a non-existent function), so we can easily fix this entry without
introducing a regression.
I opened https://github.com/awesomeWM/awesome/issues/1672 to track the
underlying problem behind the broken :get_children() function (which is
missing test coverage).
Signed-off-by: Uli Schlachter <psychon@znc.in>
Currently, "everything can require everything". It's an unstructured
mess which sometimes causes problems.
This commit adds a tool that enforces a white-list of require() uses. It
uses depgraph to scan the source code and then each use of require()
that is found is checked. If any violations are found, the tool returns
a failure.
This tool is wired up to a new target "make check-requires" which is
included in "make check". Thus, Travis will run this.
Reference: https://github.com/awesomeWM/awesome/issues/1400
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reverts part of 6b8c3642b to fix:
> Cloning into 'build/apidoc'...
> fatal: Cannot update paths and switch to branch 'pr-1429' at the same
> time.
> Did you intend to checkout 'origin/pr-1429' which can not be resolved
> as commit?
- use `--depth 1` with git-clone for faster checkout/cloning
- use `-B` with git-checkout
> If -B is given, <new_branch> is created if it doesn’t exist;
> otherwise, it is reset. This is the transactional equivalent of
>
> $ git branch -f <branch> [<start point>]
> $ git checkout <branch>
The README is in the apidoc repo by now, and how this was done here
makes it being removed and added all the time (for the
relevant/boilerplate splitting).
This reverts commit 4f1e502c26.
Apparently a leftover when it was in .travis.yml, but it still makes
sense to use those env vars instead of calling `git-confog`, which is
not stateless.
[ci skip]
- This should really add the reference to the PR/commit that triggered
the apidoc changes.
- Link to job instead of build.
- Add URL to commit range.
Closes https://github.com/awesomeWM/awesome/pull/865.
While still being used via Travis' `secure` env mechanism, we could
additionally set it through an env for the repo (not displayed by
default), and revoke/regenerate it when it gets revealed.
The token provides access only to the `apidoc` repo.
Closes https://github.com/awesomeWM/awesome/pull/866.
GLib is already used in three part of awesome (awful.widget.textclock,
gears.timer and menubar.utils). Gio will soon be added.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This moves the apidoc uploading to build-utils/travis-apidoc.sh, which
makes it more pleasant to maintain/read.
Additional enhancements:
- handle all branches and PRs, and provide compare view links as a comment
for the latter, via awesome-robot. This gets skipped for PRs for
forks, because then the Github secret is not available for security
reasons.
- use a merge commit to keep relevant changes and boilerplate together.
- simplified/shorter AWESOME_VERSION override.
- add last commit message of the repo to the apidoc's commit message.
Closes https://github.com/awesomeWM/awesome/pull/358.
This fixes commit 2dc14b10de.
That commit added the '--dirty' argument the first time we generate the version
stamp file, which is when CMake produces the Makefiles (called from
awesomeConfig.cmake). Later on, we use build-utils/git-version-stamp.sh to
update this file. That file was missing this new argument to 'dit describe'
Signed-off-by: Uli Schlachter <psychon@znc.in>
Before commit 1b2826 in lgi, the get_rgba() function on cairo SolidPatterns was
specified like this:
get_rgba = { ret = cairo.Status,
{ ti.double, dir = 'out' },
{ ti.double, dir = 'out' },
{ ti.double, dir = 'out' } },
The above commit fixed this (without saying so) and the code became:
get_rgba = { ret = cairo.Status,
{ ti.double, dir = 'out' },
{ ti.double, dir = 'out' },
{ ti.double, dir = 'out' },
{ ti.double, dir = 'out' } },
The prototype for the corresponding cairo function is:
cairo_public cairo_status_t
cairo_pattern_get_rgba (cairo_pattern_t *pattern,
double *red, double *green,
double *blue, double *alpha);
As you see, this functions gets four double* as arguments and it will save its
result via those pointers. Old versions of lgi call this function with too few
arguments and this will cause a segmentation fault when cairo dereferences an
invalid pointer.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We only need lgi for running, not for building. This means that our lgi
dependency is easily missed. This commit makes this dependency more explicit.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The 'old' tr call produced garbled output with sun's tr.
The current common/tokenize.gperf file only uses a-z, 1-5 and _. Thus the
dropped conversions don't hurt atm. If they should ever become necessary again,
we need to find another, more portable way to doing this.
Thanks to evocallaghan aka Edward O'Callaghan for trying to build awesome on
SunOS and providing some hints on how to fix it.
Signed-off-by: Uli Schlachter <psychon@znc.in>
'sh -e' makes the shell script die if any command returns an error which isn't
caught. While this is a nice feature, this script doesn't actually need this.
Not using this shell feature makes the script more portable.
Thanks to Edward O'Callaghan aka eocallagha for stumbling upon this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
While this space doesn't hurt on any modern OS (afaik), it does break stuff
on the old ones and is non-standard. Removing it won't hurt, so...
Signed-off-by: Uli Schlachter <psychon@znc.in>