mirror of
https://github.com/Alfresco/alfresco-keycloak-theme.git
synced 2025-12-19 18:18:29 -05:00
Revert to manual release.
This commit is contained in:
19
.travis.yml
19
.travis.yml
@@ -2,28 +2,23 @@ dist: trusty
|
||||
sudo: required
|
||||
language: bash
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
stages:
|
||||
- name: Build and Release
|
||||
if: tag IS present
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: "Build and Release"
|
||||
name: "Build and release alfresco-keycloak-theme"
|
||||
if: fork = false AND (branch = master) AND type != pull_request AND commit_message !~ /\[no-release\]/
|
||||
before_deploy:
|
||||
- ./set-version.sh
|
||||
- source build.properties
|
||||
- echo "Prepare deployment of alfresco-keycloak-theme-$THEME_VERSION"
|
||||
- export TRAVIS_TAG=$THEME_VERSION
|
||||
- git tag "$TRAVIS_TAG" -m ""
|
||||
- echo "Prepare deployment of alfresco-keycloak-theme-$TRAVIS_TAG"
|
||||
- ./build.sh
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key: $GITHUB_TOKEN
|
||||
file: "alfresco-keycloak-theme-$THEME_VERSION.zip"
|
||||
file: "alfresco-keycloak-theme-$TRAVIS_TAG.zip"
|
||||
skip_cleanup: true
|
||||
edge: true
|
||||
edge: true
|
||||
on:
|
||||
tag: true
|
||||
repo: Alfresco/alfresco-keycloak-theme
|
||||
2
build.properties
Executable file → Normal file
2
build.properties
Executable file → Normal file
@@ -1 +1 @@
|
||||
THEME_VERSION=0.1
|
||||
THEME_VERSION=0.2
|
||||
|
||||
22
release.sh
Executable file
22
release.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
set -o errexit
|
||||
|
||||
declare -r currentDir="$(dirname "${BASH_SOURCE[0]}")"
|
||||
source "${currentDir}/build.properties"
|
||||
|
||||
CURRENT_BRANCH=$(git branch | grep '*' | cut -d' ' -f 2)
|
||||
|
||||
echo "Do you wish to tag and push the current branch '$CURRENT_BRANCH' as '$THEME_VERSION' ?"
|
||||
select yn in "Yes" "No"; do
|
||||
case $yn in
|
||||
Yes)
|
||||
git tag "$THEME_VERSION" -m ""
|
||||
git push origin "$THEME_VERSION"
|
||||
break
|
||||
;;
|
||||
No)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
OLD_VERSION=$(cat build.properties | grep THEME_VERSION)
|
||||
OLD_VALUE=$(echo $OLD_VERSION | cut -f 2 -d "=")
|
||||
|
||||
NEW_VALUE=$(echo $OLD_VALUE + .1 | bc)
|
||||
|
||||
if [[ $NEW_VALUE == .* ]]; then
|
||||
# Append zero
|
||||
NEW_VALUE="0$NEW_VALUE"
|
||||
fi
|
||||
|
||||
echo "Setting the THEME_VERSION from '$OLD_VALUE' to '$NEW_VALUE'"
|
||||
|
||||
NEW_VERSION=$(echo THEME_VERSION=$NEW_VALUE)
|
||||
sed -i -e "s/$OLD_VERSION/$NEW_VERSION/" build.properties
|
||||
Reference in New Issue
Block a user