passepartout-apple/ci/update-bundled-api.sh
Davide 2de5aad093
Improve bump script with positional arguments (#957)
Get rid of the messy `bump*.sh` scripts variants with a single one with
positional arguments (all optional):

- -v: the new version number (default: current)
- -b: the new build number (default: current + 1)
- -s: the initial build for the CHANGELOG diff (default: latest tag)
- -na: do not update the API (default: do update it)
- -nl: do not update the CHANGELOG (default: present editor)
- -d: dry run

Fixes #948
2024-11-27 17:08:00 +01:00

16 lines
302 B
Bash
Executable File

#!/bin/bash
DESTINATION="Passepartout/Library/Sources/CommonAPI/API"
API_VERSION="v5"
mkdir tmp
cd tmp
if [[ ! `git clone https://github.com/passepartoutvpn/api --depth 1` ]]; then
cd api
git pull
fi
cd ../..
rm -rf $DESTINATION
mkdir -p $DESTINATION
cp -rp tmp/api/$API_VERSION $DESTINATION