From 6fa3633eef0e97584df49b256e7a0ef182956782 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 16 Jun 2021 13:10:22 +0300 Subject: [PATCH 1/9] Add edition string as optional version suffix --- configure.ac | 7 +++++++ vcsh.in | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 19b0747d..48d3c0bd 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,13 @@ AX_PROGVAR([comm]) AX_PROGVAR([cmp]) AX_PROGVAR([git]) +AC_ARG_WITH([edition], + AS_HELP_STRING([--with-edition], + [Add edition string to version @<:@default=@:>@]), + [], + [with_edition=]) +AC_SUBST([EDITION], [${with_edition:+-$with_edition}]) + AC_ARG_WITH([man-page], AS_HELP_STRING([--with-man-page], [Generate man page @<:@default=yes@:>@]), diff --git a/vcsh.in b/vcsh.in index 4b2c70a2..55488c9e 100755 --- a/vcsh.in +++ b/vcsh.in @@ -19,7 +19,7 @@ # If '.r-g' is appended to the version, you are seeing an unreleased # version of vcsh; the main branch is supposed to be clean at all times # so you can most likely just use it nonetheless -VCSH_VERSION='@VERSION@'; export VCSH_VERSION +VCSH_VERSION='@VERSION@@EDITION@'; export VCSH_VERSION VCSH_SELF="@TRANSFORMED_PACKAGE_NAME@"; export VCSH_SELF # Ensure all files created are accessible only to the current user. From 2ecd56adab7ba2882ad6783148283cc2b4da0927 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 15 Jun 2021 20:39:34 +0300 Subject: [PATCH 2/9] Add CI job to attach standalone edition to releases --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3bdfa1b..75ff2e5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,28 @@ on: jobs: + standalone: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Configure standalone script + run: | + echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV + ./bootstrap.sh + ./configure \ + --without-man-page \ + --disable-tests \ + --without-bash-completion-dir \ + --without-zsh-completion-dir \ + --with-edition=standalone \ + COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh + - name: Upload standalone script artifact + uses: actions/upload-artifact@v2 + with: + name: vcsh-standalone + path: vcsh + ghrelase: runs-on: ubuntu-latest steps: @@ -28,6 +50,13 @@ jobs: run: | make changelog-HEAD grep -F "* Release ${{ env.VERSION }}" changelog-HEAD + - name: Download standalone script artifact + uses: actions/download-artifact@v2 + with: + name: vcsh-standalone + path: standalone + - name: Rename standalone deployment script + run: mv standalone/vcsh vcsh-standalone.sh - name: Publish Release uses: softprops/action-gh-release@v1 with: @@ -35,5 +64,6 @@ jobs: files: | vcsh-${{ env.VERSION }}.zip vcsh-${{ env.VERSION }}.tar.xz + vcsh-standalone.sh env: GITHUB_TOKEN: ${{ github.token }} From 6f021392aede5239e9d50c67bac92ba57a32a1cc Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 16 Jun 2021 13:37:45 +0300 Subject: [PATCH 3/9] Post standalone script artifact to all CI runs --- .github/workflows/release.yml | 1 + .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75ff2e5c..f3cec24e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: ghrelase: runs-on: ubuntu-latest + needs: [ standalone ] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1808e01..ee2f11ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,35 @@ name: Test + on: [push, pull_request] + jobs: + + standalone: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Fetch tags + run: | + git fetch --prune --tags ||: + - name: Configure standalone script + run: | + ./bootstrap.sh + ./configure \ + --without-man-page \ + --disable-tests \ + --without-bash-completion-dir \ + --without-zsh-completion-dir \ + --with-edition=standalone \ + COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh + - name: Post standalone script artifact + uses: actions/upload-artifact@v2 + with: + name: vcsh-standalone + path: vcsh + test: runs-on: ubuntu-latest steps: From 981addb91d2dcf0b9743ceea83b362a23e89cafd Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 16 Jun 2021 15:13:48 +0300 Subject: [PATCH 4/9] =?UTF-8?q?Rename=20build=20property=20'edition'?= =?UTF-8?q?=E2=86=92'deployment'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- configure.ac | 10 +++++----- vcsh.in | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3cec24e..fb2f02c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: --disable-tests \ --without-bash-completion-dir \ --without-zsh-completion-dir \ - --with-edition=standalone \ + --with-deployment=standalone \ COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh - name: Upload standalone script artifact uses: actions/upload-artifact@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ee2f11ea..75ac003f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: --disable-tests \ --without-bash-completion-dir \ --without-zsh-completion-dir \ - --with-edition=standalone \ + --with-deployment=standalone \ COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh - name: Post standalone script artifact uses: actions/upload-artifact@v2 diff --git a/configure.ac b/configure.ac index 48d3c0bd..33e7bd04 100644 --- a/configure.ac +++ b/configure.ac @@ -18,12 +18,12 @@ AX_PROGVAR([comm]) AX_PROGVAR([cmp]) AX_PROGVAR([git]) -AC_ARG_WITH([edition], - AS_HELP_STRING([--with-edition], - [Add edition string to version @<:@default=@:>@]), +AC_ARG_WITH([deployment], + AS_HELP_STRING([--with-deployment], + [Add deployment string to version @<:@default=@:>@]), [], - [with_edition=]) -AC_SUBST([EDITION], [${with_edition:+-$with_edition}]) + [with_deployment=]) +AC_SUBST([DEPLOYMENT], [${with_deployment:+-$with_deployment}]) AC_ARG_WITH([man-page], AS_HELP_STRING([--with-man-page], diff --git a/vcsh.in b/vcsh.in index 55488c9e..9bbeeb1a 100755 --- a/vcsh.in +++ b/vcsh.in @@ -19,7 +19,7 @@ # If '.r-g' is appended to the version, you are seeing an unreleased # version of vcsh; the main branch is supposed to be clean at all times # so you can most likely just use it nonetheless -VCSH_VERSION='@VERSION@@EDITION@'; export VCSH_VERSION +VCSH_VERSION='@VERSION@@DEPLOYMENT@'; export VCSH_VERSION VCSH_SELF="@TRANSFORMED_PACKAGE_NAME@"; export VCSH_SELF # Ensure all files created are accessible only to the current user. From b424c4f03102b5a43aeffc09ec4945fde91612d6 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 16 Jun 2021 15:33:17 +0300 Subject: [PATCH 5/9] Document standalone script deployment option --- changelog | 2 ++ doc/INSTALL.md | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/changelog b/changelog index a63821b0..d7fca6ff 100644 --- a/changelog +++ b/changelog @@ -19,6 +19,8 @@ unreleased * Allow use of specific path when running Git or any dependency * Fail if hook scripts return failure codes * Check GIT_REMOTE early on clone() + * Support renaming script as configuration option + * Setup standalone script build profile and attach directly to releases 2021-04-05 Richard Hartmann diff --git a/doc/INSTALL.md b/doc/INSTALL.md index c2965e63..68e1cc07 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -2,6 +2,7 @@ Many distributions have packages ready to go. If yours doesn't, you can install [from source](#installing-from-source). +VCSH can also be deployed as a [standalone script](#standalone-script). If you package VCSH for a distro please let us know. ## Arch Linux @@ -124,4 +125,29 @@ $ make DESTDIR="$HOME" install-exec This will install to `~/bin/vcsh`; add `~/bin` to your path to use. +# Standalone Script + +A special variant of VCSH can be deployed as a single POSIX script with no configure/build step. +Deploying it this way leave you without any man page or shell completion functions. +This variant is also dependent or you `$PATH` to have proper versions of dependencies such as `git`. +If your user space has different tools by default than your system beware! + +The standalone variant can be downloaded from under any entry in [releases](https://github.com/RichiH/vcsh/releases). + +This method is suited for installation to a user space where you don't have control over the system packages, e.g.: + +```console +$ mkdir ~/bin +$ curl -fsLS https://github.com/RichiH/vcsh/releases/latest/download/vcsh-standalone.sh -O ~/bin/vcsh +$ chmod 755 ~/bin/vcsh +``` + +It could also be used to directly bootstrap a dotfiles repository something like this: + +```console +$ sh <(curl -fsLS https://github.com/RichiH/vcsh/releases/latest/download/vcsh-standalone.sh) clone dotfiles +``` + +Note that we strongly encourage using a tagged version that you've tested to work for you instead of the *latest* keyword. + [1]: http://rtomayko.github.io/ronn/ From 37dd08152446935ff43d6aaef1e17142887abd95 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 17 Jun 2021 11:43:11 +0300 Subject: [PATCH 6/9] Use autoconf install step even on standalone builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My previous implementation only used the configure step from autoconf. Technically in this case it should have been enough, but it’s also kind of an abuse of the tools, it was meant to have another stage. This uses the tools as they were designed, which in my history with autoconf is always easier to maintain. Also it gives us the option of using more features or doing more fancy things in an install step without the standalone versions being out of sync from system installed versions. --- .github/workflows/release.yml | 10 +++++----- .github/workflows/test.yml | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 068cde60..410bba16 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,13 +21,16 @@ jobs: --disable-tests \ --without-bash-completion-dir \ --without-zsh-completion-dir \ + --program-suffix=-standalone.sh \ --with-deployment=standalone \ + --bindir=/ \ COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh + make DESTDIR=. install-exec - name: Upload standalone script artifact uses: actions/upload-artifact@v2 with: name: vcsh-standalone - path: vcsh + path: vcsh-standalone.sh ghrelase: runs-on: ubuntu-latest @@ -59,9 +62,6 @@ jobs: uses: actions/download-artifact@v2 with: name: vcsh-standalone - path: standalone - - name: Rename standalone deployment script - run: mv standalone/vcsh vcsh-standalone.sh - name: Publish Release uses: softprops/action-gh-release@v1 with: @@ -69,6 +69,6 @@ jobs: files: | vcsh-${{ env.VERSION }}.zip vcsh-${{ env.VERSION }}.tar.xz - vcsh-standalone.sh + standalone/vcsh-standalone.sh env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 75ac003f..21efb5d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,18 +17,21 @@ jobs: - name: Configure standalone script run: | ./bootstrap.sh - ./configure \ - --without-man-page \ - --disable-tests \ - --without-bash-completion-dir \ - --without-zsh-completion-dir \ - --with-deployment=standalone \ - COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh + ./configure + --without-man-page \ + --disable-tests \ + --without-bash-completion-dir \ + --without-zsh-completion-dir \ + --with-deployment=standalone \ + --program-suffix=-standalone.sh \ + --bindir=/ \ + COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh + make DESTDIR=. install-exec - name: Post standalone script artifact uses: actions/upload-artifact@v2 with: name: vcsh-standalone - path: vcsh + path: vcsh-standalone.sh test: runs-on: ubuntu-latest From cb42e5980975f2b0488378a4353b886d54c3c164 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 17 Jun 2021 12:13:14 +0300 Subject: [PATCH 7/9] Make it easier to deploy a standalone script The number of options that needed to be set to get a proper standalone build is fairly large. Given that it was already repeated twice in different CI contexts it occurred to me the whole batch of settings should just be one preset so that people can build their own standalone version easily from the source tarball if they want. --- .github/workflows/release.yml | 18 +++++------------- .github/workflows/test.yml | 12 ++---------- configure.ac | 17 +++++++++++++++++ vcsh.in | 7 ++++--- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 410bba16..dce92192 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,20 +16,12 @@ jobs: run: | echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV ./bootstrap.sh - ./configure \ - --without-man-page \ - --disable-tests \ - --without-bash-completion-dir \ - --without-zsh-completion-dir \ - --program-suffix=-standalone.sh \ - --with-deployment=standalone \ - --bindir=/ \ - COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh - make DESTDIR=. install-exec + ./configure --with-standalone --bindir=/ + make DESTDIR=. install-exec - name: Upload standalone script artifact uses: actions/upload-artifact@v2 with: - name: vcsh-standalone + name: standalone-deployment path: vcsh-standalone.sh ghrelase: @@ -61,7 +53,7 @@ jobs: - name: Download standalone script artifact uses: actions/download-artifact@v2 with: - name: vcsh-standalone + name: standalone-deployment - name: Publish Release uses: softprops/action-gh-release@v1 with: @@ -69,6 +61,6 @@ jobs: files: | vcsh-${{ env.VERSION }}.zip vcsh-${{ env.VERSION }}.tar.xz - standalone/vcsh-standalone.sh + vcsh-standalone.sh env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21efb5d6..874beb75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,20 +17,12 @@ jobs: - name: Configure standalone script run: | ./bootstrap.sh - ./configure - --without-man-page \ - --disable-tests \ - --without-bash-completion-dir \ - --without-zsh-completion-dir \ - --with-deployment=standalone \ - --program-suffix=-standalone.sh \ - --bindir=/ \ - COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh + ./configure --with-standalone --bindir=/ make DESTDIR=. install-exec - name: Post standalone script artifact uses: actions/upload-artifact@v2 with: - name: vcsh-standalone + name: standalone-deployment path: vcsh-standalone.sh test: diff --git a/configure.ac b/configure.ac index 5f767a35..051de655 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,23 @@ AC_DEFUN([AX_PROGVAR], [ test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required]) ]) +AC_ARG_WITH([standalone], + AS_HELP_STRING([--with-standalone], + [Use configuration presets for a standalone script deployment @<:@default=no@:>@]), + [COMM=comm GIT=git GREP=grep SED=sed SHELL=/bin/sh + with_deployment=standalone + with_man_page=no + enable_tests=no + with_bash_completion_dir=no + with_zsh_completion_dir=no + program_suffix=-standalone.sh + # By this point program_suffix has already been processed so we have to redo what configure did + # Code copied from approx L2670-2671 + program_transform_name="s&\$&$program_suffix&;$program_transform_name" + program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` + ], + []) + AC_PROG_AWK AC_PROG_GREP AC_PROG_SED diff --git a/vcsh.in b/vcsh.in index c1760ce3..5e35ec93 100755 --- a/vcsh.in +++ b/vcsh.in @@ -17,10 +17,11 @@ # If '.r-g' is appended to the version, you are seeing an unreleased -# version of vcsh; the main branch is supposed to be clean at all times -# so you can most likely just use it nonetheless +# version built from the main branch HEAD. If "-standalone" is appended you are +# using a version built explicitly for portability as a standalone script +# rather than being installed to a specific system. VCSH_VERSION='@VERSION@@DEPLOYMENT@'; export VCSH_VERSION -VCSH_SELF="@TRANSFORMED_PACKAGE_NAME@"; export VCSH_SELF +VCSH_SELF='@TRANSFORMED_PACKAGE_NAME@'; export VCSH_SELF # Ensure all files created are accessible only to the current user. umask 0077 From 3f34c7396a2ab24e6dc5bab8495e130ea1d673aa Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 17 Jun 2021 14:47:39 +0300 Subject: [PATCH 8/9] Separate CI workflows to isolate test/build/release concerns --- .github/workflows/build.yml | 63 +++++++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 4 +++ .github/workflows/release.yml | 56 +++++++++++++------------------ .github/workflows/test.yml | 35 +++---------------- 4 files changed, 95 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..109dbd08 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,63 @@ +name: Build + +on: [push, pull_request] + +jobs: + + standalone: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Fetch tags + run: | + git fetch --prune --tags ||: + - name: Configure standalone script + run: | + ./bootstrap.sh + ./configure --with-standalone --bindir=/ + make DESTDIR=. install-exec + echo VERSION=$(cat .version) >> $GITHUB_ENV + - name: Post standalone script artifact + uses: actions/upload-artifact@v2 + with: + name: standalone-deployment-${{ env.VERSION }} + path: vcsh-standalone.sh + + source-dist: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Fetch tags + run: | + git fetch --prune --tags ||: + - name: Install build dependencies + run: | + sudo apt install -y ronn + - name: Install perl test dependencies + uses: perl-actions/install-with-cpanm@v1.1 + with: + install: | + Shell::Command + Test::Most + - name: Configure + run: | + ./bootstrap.sh + ./configure + - name: Run tests + run: | + 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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 749157df..186fb6db 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,9 @@ name: Lint + on: [push, pull_request] + jobs: + editor-config: runs-on: ubuntu-latest steps: @@ -8,6 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Lint code style uses: editorconfig-checker/action-editorconfig-checker@v1.0.0 + shellcheck: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dce92192..039f4380 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,32 +7,13 @@ on: jobs: - standalone: + ghrelease: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - - name: Configure standalone script - run: | - echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV - ./bootstrap.sh - ./configure --with-standalone --bindir=/ - make DESTDIR=. install-exec - - name: Upload standalone script artifact - uses: actions/upload-artifact@v2 - with: - name: standalone-deployment - path: vcsh-standalone.sh - - ghrelase: - runs-on: ubuntu-latest - needs: [ standalone ] - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install ronn + - name: Install build dependencies run: | - sudo apt update sudo apt install -y ronn - name: Configure run: | @@ -40,20 +21,13 @@ jobs: echo "${GITHUB_REF#refs/*/v}" > .tarball-version ./bootstrap.sh ./configure - - 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: Download standalone script artifact - uses: actions/download-artifact@v2 - with: - name: standalone-deployment + - name: Build source package + run: | + make dist - name: Publish Release uses: softprops/action-gh-release@v1 with: @@ -61,6 +35,24 @@ jobs: files: | vcsh-${{ env.VERSION }}.zip vcsh-${{ env.VERSION }}.tar.xz - vcsh-standalone.sh env: GITHUB_TOKEN: ${{ github.token }} + + deploy-standalone: + runs-on: ubuntu-latest + needs: [ ghrelease ] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Configure standalone script + run: | + echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV + ./bootstrap.sh + ./configure --with-standalone --bindir=/ + make DESTDIR=. install-exec + - name: Add standalone deployment to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ github.token }} + file: vcsh-standalone.sh + tag: ${{ github.ref }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 874beb75..09c6ce13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,27 +4,6 @@ on: [push, pull_request] jobs: - standalone: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Fetch tags - run: | - git fetch --prune --tags ||: - - name: Configure standalone script - run: | - ./bootstrap.sh - ./configure --with-standalone --bindir=/ - make DESTDIR=. install-exec - - name: Post standalone script artifact - uses: actions/upload-artifact@v2 - with: - name: standalone-deployment - path: vcsh-standalone.sh - test: runs-on: ubuntu-latest steps: @@ -35,9 +14,9 @@ jobs: - name: Fetch tags run: | git fetch --prune --tags ||: - - name: Install dependencies + - name: Install build dependencies run: | - sudo apt install ronn + sudo apt install -y ronn - name: Install perl test dependencies uses: perl-actions/install-with-cpanm@v1.1 with: @@ -51,12 +30,6 @@ jobs: - name: Run tests run: | make check - - name: Build source package + - name: Run full cycle packaging check 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 + make distcheck From 5bcb2ea93fb1199035ec8e62a01ef81daeed1638 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 17 Jun 2021 15:58:17 +0300 Subject: [PATCH 9/9] Copy-edit documentation for standalone deployment Co-authored-by: Richard Hartmann --- doc/INSTALL.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/INSTALL.md b/doc/INSTALL.md index 68e1cc07..a1f662d1 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -127,12 +127,12 @@ This will install to `~/bin/vcsh`; add `~/bin` to your path to use. # Standalone Script -A special variant of VCSH can be deployed as a single POSIX script with no configure/build step. -Deploying it this way leave you without any man page or shell completion functions. -This variant is also dependent or you `$PATH` to have proper versions of dependencies such as `git`. +A special variant of VCSH can be deployed as a single POSIX shell script with no configure/build step. +Deploying it this way leaves you without any man page or shell completion functions (or possibly with mismatched resources installed by your package manager for a different vcsh version). +This variant is also dependent or your `$PATH` to have proper versions of dependencies such as `git`. If your user space has different tools by default than your system beware! -The standalone variant can be downloaded from under any entry in [releases](https://github.com/RichiH/vcsh/releases). +The standalone variant can be downloaded from any recent entry in [releases](https://github.com/RichiH/vcsh/releases). This method is suited for installation to a user space where you don't have control over the system packages, e.g.: @@ -142,12 +142,12 @@ $ curl -fsLS https://github.com/RichiH/vcsh/releases/latest/download/vcsh-standa $ chmod 755 ~/bin/vcsh ``` -It could also be used to directly bootstrap a dotfiles repository something like this: +It could also be used to directly bootstrap a dotfiles repository with something like this: ```console $ sh <(curl -fsLS https://github.com/RichiH/vcsh/releases/latest/download/vcsh-standalone.sh) clone dotfiles ``` -Note that we strongly encourage using a tagged version that you've tested to work for you instead of the *latest* keyword. +While we are enabling cURL-based workflows on purpose, we still encourage you to avoid them where reasonably possible. If you do use it, please consider using a tagged version that you've tested to work for you instead of the "latest" keyword. [1]: http://rtomayko.github.io/ronn/