From c06e830f71de3aefe84f6cf442f789dd9e7c1d7b Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Tue, 4 Jan 2022 13:49:45 -0800 Subject: [PATCH] chore(maintaining): Remove update-toxcore-version.sh script Was used to update all the duplicate versions of toxcore spread around the repo. Now all builds and user instructions for the version come from buildscripts/download/download_toxcore.sh directly, so this script serves no purpose. --- MAINTAINING.md | 3 +- tools/update-toxcore-version.sh | 101 -------------------------------- 2 files changed, 1 insertion(+), 103 deletions(-) delete mode 100755 tools/update-toxcore-version.sh diff --git a/MAINTAINING.md b/MAINTAINING.md index d1c1eccbc..88c971695 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -213,8 +213,7 @@ To get translations into qTox: - Update version number for windows/osx packages using the [`./tools/update-versions.sh`] script, e.g. `./tools/update-versions.sh 1.11.0` -- Update toxcore version number to the latest tag using - [`./tools/update-toxcore-version.sh] +- Update toxcore version number to the latest tag in [`./buildscripts/download/download_toxcore.sh] - Update the bootstrap nodelist at `./res/nodes.json` from https://nodes.tox.chat/json. This can be done by running [`./tools/update-nodes.sh`] - Generate changelog with `clog`. diff --git a/tools/update-toxcore-version.sh b/tools/update-toxcore-version.sh deleted file mode 100755 index 0b61cfeb8..000000000 --- a/tools/update-toxcore-version.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -# Copyright © 2016-2019 by The qTox Project Contributors -# -# This file is part of qTox, a Qt-based graphical interface for Tox. -# qTox is libre software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# qTox is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with qTox. If not, see - - -# script to change targeted toxcore version -# -# it should be run before releasing a new version - -# usage: -# -# ./$script $version -# -# $version has to be composed of at least one number/dot - - -set -eu -o pipefail - -readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -readonly BASE_DIR="$SCRIPT_DIR/../" -readonly VERSION_PATTERN="[0-9]+\.[0-9]+\.[0-9]+" - -update_install() { - perl -i -0pe "s|(git clone https://github.com/toktok/c-toxcore.*?)$VERSION_PATTERN|\${1}$@|gms" INSTALL.md - perl -i -0pe "s|(git clone https://github.com/toktok/c-toxcore.*?)$VERSION_PATTERN|\${1}$@|gms" INSTALL.fa.md -} - -update_bootstrap() { - perl -i -0pe "s|(TOXCORE_VERSION=\"v)$VERSION_PATTERN|\${1}$@|gms" bootstrap.sh -} - -update_osx() { - cd osx - perl -i -0pe "s|$VERSION_PATTERN( --depth=1 https://github.com/toktok/c-toxcore)|$@\${1}|gms" qTox-Mac-Deployer-ULTIMATE.sh - cd .. -} - -update_flatpak() { - cd flatpak - latest_tag_ref=$(git ls-remote --tags https://github.com/toktok/c-toxcore | sort -V -k2 | tail -n1) - ref_array=($latest_tag_ref) - commit_hash=${ref_array[0]} - perl -i -0pe "s|(https://github.com/toktok/c-toxcore.*?)$VERSION_PATTERN(.*?)[a-f0-9]{40}|\${1}$@\${2}$commit_hash|gms" io.github.qtox.qTox.json - cd .. -} - -update_travis() { - cd .travis - perl -i -0pe "s|$VERSION_PATTERN( --depth=1 https://github.com/toktok/c-toxcore)|$@\${1}|gms" build-ubuntu-16-04.sh - cd .. -} - -update_docker() { - cd docker - perl -i -0pe "s|(https://github.com/toktok/c-toxcore.*?)$VERSION_PATTERN|\${1}$@|gms" Dockerfile.debian - perl -i -0pe "s|(https://github.com/toktok/c-toxcore.*?)$VERSION_PATTERN|\${1}$@|gms" Dockerfile.ubuntu - cd .. -} - -update_windows() { - cd windows/cross-compile - perl -i -0pe "s|(TOXCORE_VERSION=)$VERSION_PATTERN|\${1}$@|gms" build.sh - echo "Manually update the Windows toxcore hash in windows/cross-compile/build.sh" - cd ../.. -} - -# exit if supplied arg is not a version -is_version() { - if [[ ! $@ =~ $VERSION_PATTERN ]] - then - echo "Not a version: $@" - echo "Must match: $VERSION_PATTERN" - exit 1 - fi -} - -main() { - is_version "$@" - update_install "$@" - update_bootstrap "$@" - update_osx "$@" - update_flatpak "$@" - update_travis "$@" - update_docker "$@" - update_windows "$@" -} -main "$@"