Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- cron: '0 9 * * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
test:

Expand All @@ -20,7 +24,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0

- name: Install dependencies
Expand All @@ -41,8 +44,6 @@ jobs:

- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive

- name: Build documentation
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_Store
/.local
/scripts/Pipfile.lock
.build
.netrc
.swiftpm/config/registries.json
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

13 changes: 13 additions & 0 deletions scripts/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[source]]

name = "pypi"
url = "https://pypi.python.org/simple"
verify_ssl = true

[packages]

changes-semver = "==6.*"

[requires]

python_version = "3.12"
1 change: 0 additions & 1 deletion scripts/changes
Submodule changes deleted from 12a6b9
17 changes: 11 additions & 6 deletions scripts/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ SCRIPTS_DIRECTORY="$ROOT_DIRECTORY/scripts"

export LOCAL_TOOLS_PATH="$ROOT_DIRECTORY/.local"

export BIN_DIRECTORY="$ROOT_DIRECTORY/.local/bin"
export PATH=$BIN_DIRECTORY:$PATH
# Keep Python user installs local to the project instead of polluting the host.
export PYTHONUSERBASE="$LOCAL_TOOLS_PATH/python"
mkdir -p "$PYTHONUSERBASE"
export PATH="$PYTHONUSERBASE/bin":$PATH

source "$LOCAL_TOOLS_PATH/python/bin/activate"

export PIPENV_VENV_IN_PROJECT=1
# Keep pipenv virtualenvs local and predictable.
export WORKON_HOME="$LOCAL_TOOLS_PATH"
export PIPENV_CUSTOM_VENV_NAME="venv"
export PIPENV_VENV_IN_PROJECT=0
export PIPENV_IGNORE_VIRTUALENVS=1
export PIPENV_PIPFILE="$SCRIPTS_DIRECTORY/Pipfile"

export PATH=$PATH:"$SCRIPTS_DIRECTORY/changes"
# Add the tools to the path.
export PATH="$LOCAL_TOOLS_PATH/venv/bin":$PATH
34 changes: 34 additions & 0 deletions scripts/gh-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Copyright (c) 2022-2026 Jason Morley
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

set -e
set -o pipefail
set -x

# Actually make the release.
gh release create "$CHANGES_TAG" --title "$CHANGES_QUALIFIED_TITLE" --notes-file "$CHANGES_NOTES_FILE"

# Upload the attachments.
for attachment in "$@"
do
gh release upload "$CHANGES_TAG" "$attachment"
done
11 changes: 3 additions & 8 deletions scripts/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ ROOT_DIRECTORY="$( cd "$( dirname "$( dirname "${BASH_SOURCE[0]}" )" )" &> /dev/
SCRIPTS_DIRECTORY="$ROOT_DIRECTORY/scripts"

LOCAL_TOOLS_PATH="$ROOT_DIRECTORY/.local"
CHANGES_DIRECTORY="$SCRIPTS_DIRECTORY/changes"
BUILD_TOOLS_DIRECTORY="$SCRIPTS_DIRECTORY/build-tools"

# Install tools defined in `.tool-versions`.
cd "$ROOT_DIRECTORY"
Expand All @@ -42,12 +40,9 @@ if [ -d "$LOCAL_TOOLS_PATH" ] ; then
fi
mkdir -p "$LOCAL_TOOLS_PATH"

# Set up a Python venv to bootstrap our python dependency on `pipenv`.
python -m venv "$LOCAL_TOOLS_PATH/python"

# Source `environment.sh` to ensure the remainder of our paths are set up correctly.
source "$SCRIPTS_DIRECTORY/environment.sh"

# Install the Python dependencies.
pip install --upgrade pip pipenv wheel certifi
PIPENV_PIPFILE="$CHANGES_DIRECTORY/Pipfile" pipenv install
# Install the Python dependencies (uses PIPENV_PIPFILE from environment.sh).
pip install --user --ignore-installed --upgrade pip pipenv wheel certifi
pipenv install
4 changes: 1 addition & 3 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@

SCRIPTS_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
ROOT_DIRECTORY="${SCRIPTS_DIRECTORY}/.."
CHANGES_DIRECTORY="${SCRIPTS_DIRECTORY}/changes"
CHANGES_SCRIPT="${CHANGES_DIRECTORY}/changes"
RELEASE_SCRIPT="${CHANGES_DIRECTORY}/examples/gh-release.sh"
RELEASE_SCRIPT="${SCRIPTS_DIRECTORY}/gh-release.sh"

source "${SCRIPTS_DIRECTORY}/environment.sh"

Expand Down