Skip to content

Commit

Permalink
Merge branch 'trunk' into release for version 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
herrhotzenplotz committed Aug 26, 2024
2 parents 2a81795 + 1f583c0 commit 08e31f4
Show file tree
Hide file tree
Showing 73 changed files with 1,566 additions and 1,183 deletions.
18 changes: 4 additions & 14 deletions .builds/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,23 @@ image: alpine/edge
packages:
- libcurl
- gcc
- autoconf
- automake
- libtool
- make
- pkgconf
- musl-dev
- curl-dev
- flex
- bison
- xz
- gzip
- bzip2
- libbsd-dev
- kyua
- atf-dev
- libedit-dev
sources:
- https://git.sr.ht/~herrhotzenplotz/gcli
tasks:
- build: |
cd gcli
./autogen.sh
{
CFLAGS='-std=c99 -pedantic -Wall -Wextra -Werror' \
CPPFLAGS='-D_XOPEN_SOURCE=600' \
./configure --disable-silent-rules || (cat config.log && exit 42)
}
make -j
./configure --debug
make -j all
- check: |
cd gcli
make -j distcheck
make -j check
16 changes: 5 additions & 11 deletions .builds/debian-stable.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
image: debian/stable
packages:
- build-essential
- libssl-dev
- libcurl4-openssl-dev
- pkgconf
- autotools-dev
- bison
- flex
- make
- autoconf
- automake
- libtool
- libbsd-dev
- libatf-dev kyua
Expand All @@ -17,13 +15,9 @@ sources:
tasks:
- build: |
cd gcli
./autogen.sh
{
CFLAGS='-std=c99 -pedantic -Wall -Wextra -Werror' \
CPPFLAGS='-D_XOPEN_SOURCE=600' \
./configure --disable-silent-rules || (cat config.log && exit 42)
}
make
./configure --debug
make -j 4 all
- check: |
cd gcli
make distcheck
./configure --debug
make -j 4 check
16 changes: 4 additions & 12 deletions .builds/freebsd.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
image: freebsd/14.x
packages:
- atf
- autoconf
- automake
- ca_root_nss
- curl
- kyua
- libedit
- libssh2
- libtool
- libunistring
- m4
- pkg
- pkgconf
- readline
Expand All @@ -19,15 +16,10 @@ sources:
tasks:
- build: |
cd gcli
./autogen.sh
{
CFLAGS='-std=c99 -pedantic -Wall -Wextra -Wno-misleading-indentation -Werror' \
CPPFLAGS='-D_XOPEN_SOURCE=600' \
LEX=flex YACC=byacc \
./configure --disable-silent-rules || (cat config.log && exit 42)
}
make -j 4
./configure --debug
make -j 4 all
- check: |
cd gcli
make -j 4 distcheck
./configure --debug
make -j 4 check
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dist:

debian-amd64:
stage: testing
image: debian:bullseye
image: debian:bookworm
script:
- apt-get update
- apt-get install -y --no-install-recommends build-essential libcurl4-openssl-dev pkgconf bison flex make libbsd-dev libatf-dev kyua libreadline-dev libssl-dev
Expand Down
56 changes: 56 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,62 @@

This changelog does not follow semantic versioning.

## UNRELEASED

### Added

- Added a `-R` flag to the comment subcommand that allows you to
reply to a comment with the given ID.

### Fixed

- In various configuration places and environment variables where
boolean values are accepted you can now specify `true` as a truthy
value.

Submitted by: Gavin-John Noonan <[email protected]>

- The configure script now exits gracefully whenever a required
program couldn't be found.

Reported by: Alexey Ugnichev <[email protected]>

- A bug genereting invalid JSON when adding labels to a GitHub issue
was fixed.

- The reviews cache directory is now automatically created if it
doesn't exist avoiding a 'No such file or directory' error when
invoking the review action for the first time.

Reported by: Bence Ferdinandy <[email protected]>

- A few bugs in the patch parser have been fixed:

- Under rare conditions hunk ranges were incorrectly parsed
- Parser errors when a diff included lines starting with a backslash
(e.g. when there is no newline at the end of file) were fixed

Reported by: Bence Ferdinandy <[email protected]>

- The installation location of the manual pages of gcli has been
fixed. The latest release accidentially installed manual pages to
`${DESTDIR}${PREFIX}/share/man` instead of
`${DESTDIR}${PREFIX}/share/man/manX`.

Reported by: Bence Ferdinandy <[email protected]>

### Changed

- The pipelines subcommand has been refactored to accept actions
for pipelines. This allows cases where a pipeline triggers child
pipelines to be handled properly.

See `gcli-pipelines(1)` for documentation.

Reported by: Bence Ferdinandy <[email protected]>

### Removed

## 2.4.0 (2024-June-28)

### Added
Expand Down
10 changes: 5 additions & 5 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,14 @@ Please use the BSD Style conventions for formatting your code. This means:
I know we're not using punchcards anymore, however it makes the code
way more readable.

- Use C99
- Use C11

Please don't use C11 or even more modern features. Reason being that
Please don't use C17 or even more modern features. Reason being that
I want gcli to be portable to older platforms where either no modern
compilers are available or where we have to rely on old gcc versions
and/or buggy vendor compilers. Notable forbidden features are
`_Static_assert` and anonymous unions. If you use the compiler flags
I mentioned above you should get notified by the compiler.
and/or buggy vendor compilers. This also means that GNU extensions
are forbidden. If you use the compiler flags I mentioned above
you should get notified by the compiler.

There is a `.editorconfig` included in the source code that should
automatically provide you with all needed
Expand Down
70 changes: 53 additions & 17 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ COPTFLAGS_xlc_release= -qpic -qoptimize=4
COPTFLAGS= $(COPTFLAGS_$(CCOM)_$(OPTIMISE))
COPTFLAGS_FOR_BUILD= $(COPTFLAGS_$(CCOM_FOR_BUILD)_$(OPTIMISE))

CSTDFLAGS_gcc= -std=c99 -pedantic
CSTDFLAGS_clang= -std=c99 -pedantic
CSTDFLAGS_xlc= -qlanglvl=stdc99
CSTDFLAGS_gcc= -std=c11 -pedantic
CSTDFLAGS_clang= -std=c11 -pedantic
CSTDFLAGS_xlc= -qlanglvl=stdc11
CSTDFLAGS= $(CSTDFLAGS_$(CCOM))
CSTDFLAGS_FOR_BUILD= $(CSTDFLAGS_$(CCOM_FOR_BUILD))

Expand All @@ -47,10 +47,10 @@ CFLAGS_FOR_BUILD= $(CSTDFLAGS_FOR_BUILD) $(COPTFLAGS_FOR_BUILD) -I@SRCDIR@/inclu

############## CPPFLAGS ######################
ENV_CPPFLAGS= @ENV_CPPFLAGS@
CPPFLAGS= -DHAVE_CONFIG_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_GETOPT_H=1 -D_XOPEN_SOURCE=600 $(ENV_CPPFLAGS)
CPPFLAGS= -DHAVE_CONFIG_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_GETOPT_H=1 -D_XOPEN_SOURCE=700 $(ENV_CPPFLAGS)

ENV_CPPFLAGS_FOR_BUILD= @ENV_CPPFLAGS_FOR_BUILD@
CPPFLAGS_FOR_BUILD= -DHAVE_CONFIG_H -DYY_NO_UNPUT -DYY_NO_INPUT -D_XOPEN_SOURCE=600 $(ENV_CPPFLAGS_FOR_BUILD)
CPPFLAGS_FOR_BUILD= -DHAVE_CONFIG_H -DYY_NO_UNPUT -DYY_NO_INPUT -D_XOPEN_SOURCE=700 $(ENV_CPPFLAGS_FOR_BUILD)

# CFLAGS for dependency tracking for various compilers
CCDEPFLAGS_gcc= -MD -MF ${@:.o=.d}
Expand All @@ -70,19 +70,28 @@ LIBATFC_LIBS= @LIBATFC_LIBS@
LIBEDIT_FOUND= @LIBEDIT_FOUND@
LIBEDIT_CFLAGS_1= @LIBEDIT_CFLAGS@
LIBEDIT_LIBS_1= @LIBEDIT_LIBS@
LIBEDIT_CFLAGS= ${LIBEDIT_CFLAGS_$(LIBEDIT_FOUND)}
LIBEDIT_LIBS= ${LIBEDIT_LIBS_$(LIBEDIT_FOUND)}
LIBEDIT_CFLAGS= $(LIBEDIT_CFLAGS_$(LIBEDIT_FOUND))
LIBEDIT_LIBS= $(LIBEDIT_LIBS_$(LIBEDIT_FOUND))
LIBEDIT_CPPFLAGS_1= -DHAVE_LIBEDIT=1
LIBEDIT_CPPFLAGS= ${LIBEDIT_CPPFLAGS_$(LIBEDIT_FOUND)}
LIBEDIT_CPPFLAGS= $(LIBEDIT_CPPFLAGS_$(LIBEDIT_FOUND))

############## READLINE #########################################
LIBREADLINE_FOUND= @LIBREADLINE_FOUND@
LIBREADLINE_CFLAGS_1= @LIBREADLINE_CFLAGS@
LIBREADLINE_LIBS_1= @LIBREADLINE_LIBS@
LIBREADLINE_CFLAGS= ${LIBREADLINE_CFLAGS_$(LIBREADLINE_FOUND)}
LIBREADLINE_LIBS= ${LIBREADLINE_LIBS_$(LIBREADLINE_FOUND)}
LIBREADLINE_CFLAGS= $(LIBREADLINE_CFLAGS_$(LIBREADLINE_FOUND))
LIBREADLINE_LIBS= $(LIBREADLINE_LIBS_$(LIBREADLINE_FOUND))
LIBREADLINE_CPPFLAGS_1= -DHAVE_LIBREADLINE=1
LIBREADLINE_CPPFLAGS= ${LIBREADLINE_CPPFLAGS_$(LIBREADLINE_FOUND)}
LIBREADLINE_CPPFLAGS= $(LIBREADLINE_CPPFLAGS_$(LIBREADLINE_FOUND))

############## LOWDOWN #########################################
LIBLOWDOWN_FOUND= @LIBLOWDOWN_FOUND@
LIBLOWDOWN_CFLAGS_1= @LIBLOWDOWN_CFLAGS@
LIBLOWDOWN_LIBS_1= @LIBLOWDOWN_LIBS@
LIBLOWDOWN_CFLAGS= $(LIBLOWDOWN_CFLAGS_$(LIBLOWDOWN_FOUND))
LIBLOWDOWN_LIBS= $(LIBLOWDOWN_LIBS_$(LIBLOWDOWN_FOUND))
LIBLOWDOWN_CPPFLAGS_1= -DHAVE_LIBLOWDOWN=1
LIBLOWDOWN_CPPFLAGS= $(LIBLOWDOWN_CPPFLAGS_$(LIBLOWDOWN_FOUND))

############## LIBCRYPTO ########################################
LIBCRYPTO_CFLAGS= @LIBCRYPTO_CFLAGS@
Expand Down Expand Up @@ -282,11 +291,12 @@ $(TEMPLATE_HEADERS) $(TEMPLATE_SRCS): pgen
gcli: libgcli.a $(GCLI_OBJS)
$(CCACHE) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o gcli \
$(GCLI_OBJS) libgcli.a $(LIBCURL_LIBS) $(LIBEDIT_LIBS) \
$(LIBREADLINE_LIBS) $(LIBCRYPTO_LIBS)
$(LIBREADLINE_LIBS) $(LIBCRYPTO_LIBS) \
$(LIBLOWDOWN_LIBS)

libgcli.a: $(LIBGCLI_OBJS)
$(AR) -rc libgcli.a $(LIBGCLI_OBJS)
$(RANLIB) libgcli.a
$(CCACHE) $(AR) -rc libgcli.a $(LIBGCLI_OBJS)
$(CCACHE) $(RANLIB) libgcli.a

$(LIBGCLI_OBJS): $(TEMPLATE_HEADERS) $(TEMPLATE_SRCS)

Expand All @@ -295,6 +305,7 @@ $(LIBGCLI_OBJS): $(TEMPLATE_HEADERS) $(TEMPLATE_SRCS)
@mkdir -p $$(dirname $@)
$(CCACHE) $(CC) $(CFLAGS) $(CCDEPFLAGS) $(CPPFLAGS) \
$(LIBCURL_CFLAGS) $(LIBCRYPTO_CFLAGS) \
$(LIBLOWDOWN_CFLAGS) $(LIBLOWDOWN_CPPFLAGS) \
-DIN_LIBGCLI=1 -c -o $@ $<

.c.gcli.o:
Expand All @@ -303,6 +314,7 @@ $(LIBGCLI_OBJS): $(TEMPLATE_HEADERS) $(TEMPLATE_SRCS)
$(LIBEDIT_CPPFLAGS) $(LIBREADLINE_CPPFLAGS) \
$(LIBCURL_CFLAGS) $(LIBEDIT_CFLAGS) \
$(LIBREADLINE_CFLAGS) $(LIBCRYPTO_CFLAGS) \
$(LIBLOWDOWN_CFLAGS) $(LIBLOWDOWN_CPPFLAGS) \
-c -o $@ $<

.c.pgen.o:
Expand All @@ -319,19 +331,29 @@ clean-auto:
$(TEST_PROGRAMS) \
$(MANPAGES)

###### TEST SUITE #####################################
TEST_PROGRAMS = \
tests/json-escape \
tests/github-parse \
tests/gitlab-parse \
tests/gitea-parse \
tests/bugzilla-parse \
tests/url-encode \
tests/pretty-print \
tests/jsongen \
tests/base64 \
tests/difftests

$(TEST_PROGRAMS): libgcli.a $(TEST_PROGRAMS:=.tests.o)
tests/json-escape: tests/json-escape.tests.o
tests/github-parse: tests/github-parse.tests.o
tests/gitlab-parse: tests/gitlab-parse.tests.o
tests/gitea-parse: tests/gitea-parse.tests.o
tests/bugzilla-parse: tests/bugzilla-parse.tests.o
tests/url-encode: tests/url-encode.tests.o
tests/jsongen: tests/jsongen.tests.o
tests/base64: tests/base64.tests.o
tests/difftests: tests/difftests.tests.o

$(TEST_PROGRAMS): libgcli.a
$(CCACHE) $(CC) $(CFLAGS) $(CCDEPFLAGS) $(CPPFLAGS) \
$(LIBATFC_CFLAGS) $(LIBCURL_CFLAGS) $(LIBCRYPTO_CFLAGS) \
$(LDFLAGS) -o $@ $(@:=.tests.o) libgcli.a \
Expand Down Expand Up @@ -396,5 +418,19 @@ install-auto: manpages gcli
$(INSTALL) -d $(BINDIR)
$(INSTALL) -m 0755 gcli $(BINDIR)
$(INSTALL) -d $(MANDIR)
$(INSTALL) -d $(MANDIR)/man5
$(INSTALL) -d $(MANDIR)/man1
# TODO: compress manual pages
$(INSTALL) -m 644 $(MANPAGES) $(MANDIR)
for PAGE in $(MANPAGES); do \
case $$PAGE in \
*.1) \
$(INSTALL) -m 644 $$PAGE $(MANDIR)/man1 \
;; \
*.5) \
$(INSTALL) -m 644 $$PAGE $(MANDIR)/man5 \
;; \
*) \
echo error installing man page $$PAGE >&2 \
;; \
esac \
done
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Required dependencies:
- libcurl
- yacc (System V yacc, Berkeley Yacc or Bison should suffice)
- lex (flex is preferred)
- C99 Compiler and linker
- C11 Compiler and linker
- make
- pkg-config

Expand Down
Loading

0 comments on commit 08e31f4

Please sign in to comment.