-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created scripts to easily revert or tag releases in svn repo
- Loading branch information
1 parent
3ac23d0
commit 9a79068
Showing
4 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env zsh | ||
|
||
# | ||
# svn_create_tag.sh | ||
# material-board | ||
# | ||
# Created by Fatih Balsoy on 15 Dec 2023 | ||
# Copyright © 2023 Fatih Balsoy. All rights reserved. | ||
# | ||
|
||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/.. | ||
if [[ -z "$SCRIPTPATH" ]]; then | ||
echo "SCRIPTPATH is empty. Exiting." | ||
exit 1 | ||
fi | ||
|
||
build_path="$SCRIPTPATH/build/" | ||
svn_path="$SCRIPTPATH/svn/" | ||
if [[ ! -d "$build_path" || ! -d "$svn_path" ]]; then | ||
echo "Build or SVN path does not exist. Exiting." | ||
exit 1 | ||
fi | ||
|
||
source $SCRIPTPATH/scripts/plugin_info.sh | ||
PLUGIN_ZIP_NAME="${PLUGIN_BUNDLE}-${PLUGIN_VERSION}" | ||
echo "$PLUGIN_ZIP_NAME" | ||
|
||
tag_path="$SCRIPTPATH/svn/tags/$PLUGIN_VERSION/" | ||
if [[ -d "$tag_path" ]]; then | ||
echo "Tag for $PLUGIN_VERSION already exists! Exiting." | ||
exit 1 | ||
fi | ||
|
||
echo "Bundling plugin..." | ||
npm run build | ||
|
||
echo "Clearing trunk..." | ||
rm -rf "$SCRIPTPATH/svn/trunk/" | ||
mkdir -p "$SCRIPTPATH/svn/trunk/" | ||
echo "Creating tag..." | ||
mkdir -p "$SCRIPTPATH/svn/tags/$PLUGIN_VERSION" | ||
echo "Copying files..." | ||
cp -ar "$SCRIPTPATH/build/_bundle/$PLUGIN_BUNDLE/." "$SCRIPTPATH/svn/tags/$PLUGIN_VERSION" | ||
cp -ar "$SCRIPTPATH/build/_bundle/$PLUGIN_BUNDLE/." "$SCRIPTPATH/svn/trunk" | ||
|
||
echo "Done." |