Commit Graph

106 Commits

Author SHA1 Message Date
Daniel Hahler 01ad63eaaa
Travis: apidoc: fix build URL (#2705) 2019-02-25 13:50:54 +01:00
Uli Schlachter ee944f4da8 gears.surface: Use GdkPixbuf
This now does directly what previously awesome.load_image() did. Also,
this commit removes the only caller of awesome.load_image(), so that
function could (in theory) be removed now.

Fixes: https://github.com/awesomeWM/awesome/issues/1235
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-01-18 18:19:07 +01:00
Daniel Hahler 288b7030f3 build-utils/dist.sh: remove "-dirty" suffix (#2074)
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]
2017-10-22 16:34:04 +02:00
Daniel Hahler cc2d4e9189 build-utils/dist.sh: reproducible builds (fixes shellcheck issues, adds usage) (#1983) 2017-08-31 21:20:08 +02:00
Uli Schlachter ddc51cf38c Port lgi-check.sh to C
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>
2017-06-13 15:47:07 +02:00
Uli Schlachter 3bda88ff64 Remove obsolete entries from check_for_invalid_requires.lua (#1673)
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>
2017-03-26 15:20:18 -04:00
Uli Schlachter 0afed66ccf Add a utility checking uses of require()s
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>
2017-02-08 08:35:43 +01:00
Emmanuel Lepage Vallee 528ab6c7cf doc: Removed remaining references to .lua.in files
The .in is no longer used

Fix #1525
2017-02-05 12:16:27 -05:00
Daniel Hahler bb98a4e62b travis-apidoc.sh: revert -B with git-checkout (#1431)
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?
2017-01-22 22:52:16 +01:00
Daniel Hahler 6b8c3642bd apidoc: improvements to its Git magic (#1399)
- 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>
2017-01-15 15:40:25 +01:00
Daniel Hahler 2c3aebc19e apidoc README: create it in ../doc (#1397)
This should hopefully handle it correctly now.

Ref: https://github.com/awesomeWM/awesome/pull/1390#issuecomment-272630337
2017-01-14 16:50:06 +01:00
Daniel Hahler f35dc57c5b build-utils/travis-apidoc.sh: ignore README.md in diff (#1390) 2017-01-13 14:35:31 +01:00
Daniel Hahler 1f8309f1ff Revert "Add a README for the apidoc repository (#1324)"
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.
2017-01-10 18:14:52 +01:00
Uli Schlachter 1078a9f395 Bump minimal LGI version to 0.8.0 (#1350)
Turns out that menubar already uses features that were only added in
that version.

Fixes: https://github.com/awesomeWM/awesome/issues/1348
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:53:02 +01:00
Uli Schlachter 4f1e502c26 Add a README for the apidoc repository (#1324)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-28 22:23:51 +01:00
Daniel Hahler 69915fb658 Travis: fix "Testing previous commits"
Fixes/massages TRAVIS_COMMIT_RANGE.

Ref: https://github.com/awesomeWM/awesome/pull/1298#pullrequestreview-14364986
2016-12-25 16:03:40 +01:00
Uli Schlachter fd1a622b5f Sign release tarballs (#1286)
Fixes: https://github.com/awesomeWM/awesome/issues/1254
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-23 19:13:25 +01:00
Daniel Hahler 23ad19d988 travis-apidoc.sh: remove misleading comment
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]
2016-08-15 17:37:54 +02:00
Daniel Hahler 72725ef7ce Travis: redirect/filter stderr for git-clone/git-push/curl (#911)
git-clone for example might reveal the token on network errors, which is
now replaced by `sed`.
2016-05-16 18:54:19 +02:00
Daniel Hahler 30eafb1132 travis-apidoc.sh: add `|| true` to grep calls (#887)
This made the apidoc script stop before the merge/push.

This also adds "EXIT CODE" information in case there is a non-zero exit.
2016-05-09 01:05:53 +02:00
Daniel Hahler 7b0dcfc3df Travis: apidoc: improve merge commit's message
- 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.
2016-05-02 01:52:56 +02:00
Daniel Hahler 95f1b1ad56 Travis: use new GH_APIDOC_TOKEN
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.
2016-05-02 00:56:01 +02:00
Daniel Hahler a0e98c6157 travis-apidoc: shellcheck fixes, especially for non-empty GH_TOKEN 2016-04-05 00:59:29 +02:00
Daniel Hahler c431f06538 travis-apidoc: important note about valid json 2016-04-05 00:28:21 +02:00
Daniel Hahler a10431e7a4 travis-apidoc: reference PR only in merge commit for less noise in the PR 2016-04-05 00:27:57 +02:00
Daniel Hahler 7f17f6bc0f travis-apidoc: add link to pull request to commit messages 2016-04-05 00:23:25 +02:00
Daniel Hahler 755088e87a travis-apidoc: fix old/new revisions in PR comments 2016-04-05 00:23:16 +02:00
Uli Schlachter 5db6c04c42 Add vim modelines to all shell scripts
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-12 17:36:35 +01:00
Daniel Hahler 9b3558899b travis-apidoc: swap 'relevant' and 'boilerplate' commits 2015-10-30 00:02:19 +01:00
Daniel Hahler b655b74cb9 travis-apidoc.sh: fix diff -I pattern for h2
`diff -I` appears to match the parentheses as-is.

It should not have been triggered for
https://travis-ci.org/awesomeWM/awesome/jobs/87792709#L3334.
2015-10-28 01:23:25 +01:00
Uli Schlachter 953cdf416e lgi-check.sh: Add dependencies to GLib and Gio
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>
2015-08-13 09:09:14 +02:00
Daniel Hahler e47773933c Bump required lgi version to 0.7.1
Ref: https://github.com/pavouk/lgi/issues/41
Ref: https://github.com/awesomeWM/awesome/pull/392
2015-08-11 19:08:35 +02:00
Daniel Hahler 71f549ee79 Travis: add lgi 0.7.0 to the build matrix
This makes sure that the build and tests succeed with the minimal required
version.
2015-08-11 19:08:35 +02:00
Daniel Hahler 88ba798ae3 Travis: apidoc: script, compare view, PR comment
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.
2015-08-02 21:55:16 +02:00
Daniel Hahler 256ecd4d8e Improve git-version-stamp's error messages 2015-06-10 19:41:48 +02:00
Uli Schlachter 4636b111b4 cmake: Really add '--dirty' flag to 'git describe' for version
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>
2015-03-07 14:08:39 +01:00
Uli Schlachter 41bc77d64c Bump minimum lgi dependency to 0.7.0
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>
2014-03-17 17:52:09 +01:00
Uli Schlachter 574811d270 CMake: Check for the needed lgi dependency
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>
2012-11-25 19:43:09 +01:00
Uli Schlachter 6bb646861c Stop using gperf
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-02 19:24:39 +02:00
Maciej Blizinski 182851d29d Fix gperf usage (FS#740)
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-15 09:59:02 +01:00
Julien Danjou 4a28c6b219 build: dist now build .xz instead of .gz
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-26 20:03:17 +01:00
Julien Danjou a9880a6c89 readd proper C API documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Perrin "kAworu" Alexandre 319f2d55bc removed WidgetList, name_func_link_t and related function
use tokenize.gperf instead.

Signed-off-by: Perrin "kAworu" Alexandre <kaworu(a)kaworu,ch>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-17 16:22:42 +02:00
Uli Schlachter 02e39eb8e0 Use tr [:lower:] [:upper:] instead of the a-z one
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>
2009-05-10 10:46:25 +02:00
Uli Schlachter 886d62fb59 Use 'sh' instead of 'sh -e'
'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>
2009-05-10 10:40:09 +02:00
Uli Schlachter 90d6c799ff Fix a bashism in gperf.sh
This (hopefully) fixes a bug reported by evocallaghan with ksh.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-05-10 10:39:48 +02:00
Uli Schlachter cf4630dbe1 Remove some useless use of cat
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-05-10 10:39:24 +02:00
Uli Schlachter d9c71f4e23 Fix a wrong leading space in gperf.sh's shebang
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>
2009-05-10 10:39:15 +02:00
Julien Danjou 24b82772d2 atoms: drop useless strlen usage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 13:37:01 +02:00
Julien Danjou 2037a053a9 layout: move layout code to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:21 +01:00