summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:23:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:23:16 +0000
commit3e97c51418e6d27e9a81906f347fcb7c78e27d4f (patch)
treeee596ce1bc9840661386f96f9b8d1f919a106317 /bin
parentInitial commit. (diff)
downloadicingaweb2-module-incubator-3e97c51418e6d27e9a81906f347fcb7c78e27d4f.tar.xz
icingaweb2-module-incubator-3e97c51418e6d27e9a81906f347fcb7c78e27d4f.zip
Adding upstream version 0.20.0.upstream/0.20.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/make-release.sh51
-rwxr-xr-xbin/refresh-public.sh3
2 files changed, 54 insertions, 0 deletions
diff --git a/bin/make-release.sh b/bin/make-release.sh
new file mode 100755
index 0000000..fa3e48e
--- /dev/null
+++ b/bin/make-release.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+VERSION="$1"
+
+if [[ -z $VERSION ]]; then
+ echo "USAGE: $0 <version>"
+ echo " e.g.: $0 0.1.0"
+ exit 1
+fi
+
+function fail {
+ local msg="$1"
+ echo "ERROR: $msg"
+ exit 1
+}
+
+TAG=$(git tag | grep -c "$VERSION$")
+
+if [[ "$TAG" -ne "0" ]]; then
+ echo -n "Version $VERSION has already been tagged: "
+ git tag | grep "$VERSION"
+ exit 1
+fi
+
+BRANCH="stable/$VERSION"
+git checkout -b "$BRANCH"
+git rm -rf vendor
+rm -rf vendor
+rm -f composer.lock
+composer install || fail "composer install failed"
+find vendor/ -type f -name "*.php" -or -name "*.js" -or -name "*.css" -or -name "*.less" -or -name "*.json" \
+ | grep -v '/examples/' \
+ | grep -v '/example/' \
+ | grep -v '/tests/' \
+ | grep -v '/test/' \
+ | xargs -L1 git add -f
+find vendor/ -type f -name LICENSE | xargs -L1 git add -f
+find public/ -type f | xargs -L1 git add -f
+sed -i.bak "s/^Version:.*/Version: $VERSION/" module.info && rm -f module.info.bak
+git add module.info
+git add composer.lock -f
+git commit -m "Version v$VERSION"
+
+rm -rf vendor
+git checkout vendor
+composer validate --no-check-all --strict || fail "Composer validate failed"
+
+git tag -a v$VERSION -m "Version v$VERSION"
+echo "Finished, tagged v$VERSION"
+echo "Now please run:"
+echo "git push -u origin "$BRANCH":"$BRANCH" && git push --tags"
diff --git a/bin/refresh-public.sh b/bin/refresh-public.sh
new file mode 100755
index 0000000..77286e1
--- /dev/null
+++ b/bin/refresh-public.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+find -L vendor/*/*/public/css -type f -name "*.less" -exec cat {} \; 2>/dev/null > public/css/combined.less
+find -L vendor/*/*/public/js -type f -name "*.js" -exec cat {} \; 2>/dev/null > public/js/combined.js