Skip to content

Commit

Permalink
Merge pull request #288 from alerque/autotools
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque authored May 29, 2021
2 parents 1dcfd26 + c1ae32d commit fb7fde8
Show file tree
Hide file tree
Showing 22 changed files with 864 additions and 283 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ root = true
end_of_line = lf
insert_final_newline = true

[{vcsh,_vcsh_bash}]
[{vcsh.in,completions/vcsh.*}]
indent_style = tab
trim_trailing_whitespace = true
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure
run: |
./bootstrap.sh
./configure --without-man-page --disable-tests
- name: Run shellcheck
uses: reviewdog/[email protected]
with:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
tags:
- v*.*.*

jobs:

ghrelase:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure
run: |
echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
echo "${GITHUB_REF#refs/*/v}" > .tarball-version
./bootstrap.sh
./configure --disable-dependency-checks
- name: Build source package
run: |
make dist
- name: Check source package behaviour
run: |
make distcheck
- name: Make sure changelog was updated
run: |
make changelog-HEAD
grep -F "* Release ${{ env.VERSION }}" changelog-HEAD
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
body_path: changelog-HEAD
files: |
vcsh-${{ env.VERSION }}.zip
vcsh-${{ env.VERSION }}.tar.xz
env:
GITHUB_TOKEN: ${{ github.token }}
24 changes: 21 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,33 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install build dependencies
with:
fetch-depth: 0
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Install dependencies
run: |
sudo apt-get install ruby-ronn
sudo apt install ronn
- name: Install perl test dependencies
uses: perl-actions/[email protected]
with:
install: |
Shell::Command
Test::Most
- name: Configure
run: |
./bootstrap.sh
./configure
- name: Run tests
run: |
make test
make check
- name: Build source package
run: |
make dist
echo VERSION=$(cat .version) >> $GITHUB_ENV
- name: Post build artifacts
uses: actions/upload-artifact@v2
with:
name: vcsh-${{ env.VERSION }}
path: vcsh-${{ env.VERSION }}.zip
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,18 @@ vcsh.1
*.swp
.swp
*.bak
.version
.version-prev
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
build-aux/install-sh
build-aux/missing
completions/_vcsh
completions/vcsh
config.log
config.status
configure
/vcsh
vcsh-*
87 changes: 56 additions & 31 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,41 +1,66 @@
Alphabetical list of surnames of everyone who ever committed to this repository.
Auto-generated from tools/list_CONTRIBUTORS.
Alphabetical list of names of everyone who ever committed to this repository.
Auto-generated using `make -B CONTRIBUTORS`

Skurikhin Alexander <[email protected]>
Eric Bouchut <[email protected]>
Dridi Boukelmoune <[email protected]>
Rob Cornish <[email protected]>
Vincent Demeester <[email protected]>
Mert Dirik <[email protected]>
Jeff Fein-Worton <[email protected]>
Thomas Ferris Nicolaisen <[email protected]>
martin f. krafft <[email protected]>
Aaron Schumacher <[email protected]>
Aaron VonderHaar <[email protected]>
Alessandro Ghedini <[email protected]>
Dennis Gilmore <[email protected]>
Thorsten Glaser <[email protected]>
G.raud <[email protected]>
Mikhail Gusarov <[email protected]>
Valentin Haenel <[email protected]>
Richard Hartmann <[email protected]>
Gregor Jasny <[email protected]>
Errietta Kostala <[email protected]>
Yuval Langer <[email protected]>
Alexander Skurikhin <[email protected]>
Andrew Schwartzmeyer <[email protected]>
arndtc <[email protected]>
Aryel Mota Góis <[email protected]>
Caleb Maclennan <[email protected]>
Markus Martin <[email protected]>
mek-apelsin <[email protected]>
Evan Pitstick <[email protected]>
Dieter Plaetinck <[email protected]>
Corey Quinn <[email protected]>
Pavlos Ratis <[email protected]>
Daniel Shahaf <[email protected]>
Dato Simó <[email protected]>
Debian Janitor <[email protected]>
Dennis Gilmore <[email protected]>
Devin J. Pohly <[email protected]>
Dewey Sasser <[email protected]>
Dieter Plaetinck <[email protected]>
Don <[email protected]>
Don March <[email protected]>
Dridi Boukelmoune <[email protected]>
Edward Betts <[email protected]>
Eli Young <[email protected]>
Eric Bouchut <[email protected]>
Errietta Kostala <[email protected]>
Evan Pitstick <[email protected]>
Fedora Release Engineering <[email protected]>
Felix Eckhofer <[email protected]>
Florian Engel <[email protected]>
Frank Terbeck <[email protected]>
Gernot Schulz <[email protected]>
Aaron Schumacher <[email protected]>
Andrew Schwartzmeyer <[email protected]>
Dato Simó <[email protected]>
Alexander Skurikhin <[email protected]>
G.raud <[email protected]>
Gregor Jasny <[email protected]>
guy hughes <[email protected]>
Harendra Kumar <[email protected]>
James Davidson <[email protected]>
Jeff Fein-Worton <[email protected]>
Jochen Keil <[email protected]>
Jonathan Sternberg <[email protected]>
Julien Lecomte <[email protected]>
Kevin Lyda <[email protected]>
leycec <[email protected]>
Markus Martin <[email protected]>
martin f. krafft <[email protected]>
Mathias Svensson <[email protected]>
Frank Terbeck <[email protected]>
mek-apelsin <[email protected]>
Mert Dirik <[email protected]>
Mikhail Gusarov <[email protected]>
mirabilos <[email protected]>
Aaron VonderHaar <[email protected]>
miramir <[email protected]>
Noah Birnel <[email protected]>
Pavlos Ratis <[email protected]>
Richard Hartmann <[email protected]>
Rob Cornish <[email protected]>
Roland Hopferwieser <[email protected]>
Skurikhin Alexander <[email protected]>
soulofmischief <[email protected]>
Thomas Ferris Nicolaisen <[email protected]>
Thomas Tuegel <[email protected]>
Thorsten Glaser <[email protected]>
tikki <[email protected]>
Tony <[email protected]>
Valentin Haenel <[email protected]>
Vincent Demeester <[email protected]>
Yuval Langer <[email protected]>
48 changes: 0 additions & 48 deletions Makefile

This file was deleted.

99 changes: 99 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
ACLOCAL_AMFLAGS = -I build-aux

.ONESHELL:
.SECONDARY:
.SECONDEXPANSION:
.DELETE_ON_ERROR:

docdir = $(datarootdir)/doc/$(TRANSFORMED_PACKAGE_NAME)
licensedir = $(datarootdir)/licenses/$(TRANSFORMED_PACKAGE_NAME)

dist_doc_DATA = changelog doc/INSTALL.md doc/README.md doc/error_codes.md
samplehooksdir = $(docdir)/sample_hooks
dist_samplehooks_DATA = doc/sample_hooks/post-init-add-origin doc/sample_hooks/post-init-setup-mr doc/sample_hooks/post-merge-unclobber doc/sample_hooks/pre-merge-unclobber
dist_license_DATA = LICENSE CONTRIBUTORS
if ENABLE_MAN_PAGE
dist_man_MANS = vcsh.1
endif
bin_SCRIPTS = vcsh

EXTRA_DIST = completions/vcsh.bash completions/vcsh.zsh build-aux/git-version-gen build-aux/ax_prog_perl_modules.m4

BUILT_SOURCES = .version
CLEANFILES = $(BUILT_SOURCES) .version-prev $(dist_man_MANS) $(bin_SCRIPTS)

if ENABLE_BASH_COMPLETION
bashcompletiondir = $(BASH_COMPLETION_DIR)
nodist_bashcompletion_DATA = completions/$(TRANSFORMED_PACKAGE_NAME)
CLEANFILES += $(nodist_bashcompletion_DATA)
endif

if ENABLE_ZSH_COMPLETION
zshcompletiondir = $(ZSH_COMPLETION_DIR)
nodist_zshcompletion_DATA = completions/_$(TRANSFORMED_PACKAGE_NAME)
CLEANFILES += $(nodist_zshcompletion_DATA)
endif

vcsh.1: doc/vcsh.1.ronn
$(RONN) < $< > $@

completions/$(TRANSFORMED_PACKAGE_NAME): completions/vcsh.bash
mkdir -p $(dir $@)
cp -bf $< $@

completions/_$(TRANSFORMED_PACKAGE_NAME): completions/vcsh.zsh
mkdir -p $(dir $@)
cp -bf $< $@

.version: $(shell $(AWK) '{print ".git/" $$2}' .git/HEAD 2>/dev/null ||:)
[ -e "$@" ] && mv "$@" "$@-prev" || $(if $<,touch,cp "$(srcdir)/.tarball-version") "$@-prev"
$(if $<,./build-aux/git-version-gen "$(srcdir)/.tarball-version",printf "$(VERSION)") > "$@"
$(CMP) -s "$@" "$@-prev" || autoreconf configure.ac --force

_CHECKDEPS = check-version

if ENABLE_TESTS
_CHECKDEPS += prove
endif

check-local: $(_CHECKDEPS)

installcheck-local:
./$(TRANSFORMED_PACKAGE_NAME) version

.PHONY: check-version
check-version: vcsh | .version
$(GREP) -Fx '$(VERSION)' $|
./$< version | $(GREP) -Ff $|
./$< version | $(GREP) -Ff <($(GIT) version)

.PHONY: prove
prove:
prove

.PHONY: test
test: prove

.PHONY: lint
lint: lint-editor-config lint-shellcheck

.PHONY: lint-editor-config
lint-editor-config:
ec

.PHONY: lint-shellheck
lint-shellcheck: vcsh
shellcheck $<

CONTRIBUTORS:
exec > $@
echo 'Alphabetical list of names of everyone who ever committed to this repository.'
echo 'Auto-generated using `make -B CONTRIBUTORS`'
echo
$(GIT) shortlog -se --all | cut -f1 --complement | sort -u

changelog-HEAD: changelog
sed -nEe '2d;s/^\t//p;/^$$/q;' $< > $@

dist-hook:
printf "$(VERSION)" > "$(distdir)/.tarball-version"
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ All slides, videos, and further information can be found
# Installation

A lot of modern UNIX-based systems offer packages for `vcsh`. In case yours
does not, read [INSTALL.md](doc/INSTALL.md) for install instructions or
[PACKAGING.md](doc/PACKAGING.md) to create a package yourself. If you do end
up packaging `vcsh` please let us know so we can give you your own packaging
branch in the upstream repository.
does not, read [INSTALL.md](doc/INSTALL.md) for instructions on installing from
sources or even create a package for your system. If you do end up packaging
`vcsh` please let us know so we can document package availability.

# Contact

Expand Down
Loading

0 comments on commit fb7fde8

Please sign in to comment.