1
0
Fork 0

Remove Git

This commit is contained in:
Alex Kotov 2024-01-04 20:52:50 +04:00
parent 64929e4fd4
commit 03136a75ff
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 0 additions and 91 deletions

View file

@ -1,38 +0,0 @@
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
IFS=$'\n'
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
cd "$REPO_DIR"
source "./.venv/bin/activate"
# Make sure git is clean
if [ -z "$(git status --porcelain)" ] && [[ "$(git branch --show-current)" == "master" ]]; then
git pull
else
echo "[!] Warning: git status is dirty!"
echo " Press Ctrl-C to cancel, or wait 10sec to continue..."
sleep 10
fi
# Bump version number in source
function bump_semver {
echo "$1" | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g'
}
OLD_VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
NEW_VERSION="$(bump_semver "$OLD_VERSION")"
echo "[*] Bumping VERSION from $OLD_VERSION to $NEW_VERSION"
contents="$(jq ".version = \"$NEW_VERSION\"" "$REPO_DIR/package.json")" && \
echo "${contents}" > package.json

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
IFS=$'\n'
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
cd "$REPO_DIR"
# Run the linters and tests
# ./bin/lint.sh
# ./bin/test.sh
# Run all the build scripts
./bin/build_git.sh
# Push relase to public repositories
./bin/release_git.sh
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
echo "[√] Done. Published version v$VERSION"

View file

@ -1,25 +0,0 @@
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
IFS=$'\n'
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
cd "$REPO_DIR"
# Push build to github
echo "[^] Pushing release commit + tag to Github"
git commit -am "$VERSION release"
git tag -a "v$VERSION" -m "v$VERSION"
git push origin master
git push origin --tags
echo " To finish publishing the release go here:"
echo " https://github.com/ArchiveBox/ArchiveBox/releases/new"