Explorar el Código

Update automation scripts

pull/324/head
Guillaume Vincent hace 7 años
padre
commit
ac89097db3
Se han modificado 7 ficheros con 67 adiciones y 34 borrados
  1. +1
    -1
      cordova
  2. +17
    -27
      scripts/add-lesspass-pure.sh
  3. +6
    -2
      scripts/build-lesspass-pure.sh
  4. +34
    -0
      scripts/check-status.sh
  5. +5
    -2
      scripts/release-webextensions.sh
  6. +3
    -1
      scripts/zip-src-for-webextension.sh
  7. +1
    -1
      webextension

+ 1
- 1
cordova

@@ -1 +1 @@
Subproject commit f0477e9c0d79099e3e8a5a4c444a140fa3c3264e
Subproject commit 8469e3ae4b22fe908386662775e6a21007954a12

+ 17
- 27
scripts/add-lesspass-pure.sh Ver fichero

@@ -1,45 +1,35 @@
#!/usr/bin/env bash

function no_uncommitted_changes {
if [ -n "$(git status --porcelain)" ]; then
echo "There is changes not staged here, skipping this repo...";
return 1
else
return 0
fi
}
# context verification
if [ ! -f readme.md ]; then
echo "You seems to be in the wrong directory"
echo "Execute this script from the root of LessPass with ./scripts/${0##*/}"
exit 1
fi
bash ./scripts/check-status.sh
if [ "$?" == "1" ];then exit 1;fi
# verification completed


function commit-with-message {
git add .
git commit -m 'Adding the lastest version of lesspass-pure'
git status
git push --tags origin master
}

function cmd {
echo
echo "------------------------------------------------"
pwd
echo "------------------------------------------------"
if no_uncommitted_changes; then
npm install --save lesspass-pure
npm run build
commit-with-message
fi
cd $1
npm install --save lesspass-pure
npm run build
commit-with-message
cd ..
}

if [ ! -f readme.md ]; then
echo "You seems to be in the wrong directory"
echo "Execute this script from the root of lesspass with ./scripts/add-lesspass-pure.sh"
exit 1
fi

submodules="cordova cozy desktop frontend webextension"
for submodule in ${submodules}
do
cd $submodule
cmd
cd ..
cmd $submodule &
done
wait

commit-with-message

+ 6
- 2
scripts/build-lesspass-pure.sh Ver fichero

@@ -1,17 +1,21 @@
#!/usr/bin/env bash

# context verification
if [ ! -f readme.md ]; then
echo "You seems to be in the wrong directory"
echo "Execute this script from the root of lesspass with ./scripts/build-lesspass-pure.sh"
echo "Execute this script from the root of LessPass with ./scripts/${0##*/}"
exit 1
fi

if [ -z $1 ]; then
echo "Oops, you need to set a version in major.minor.patch"
echo "Example:"
echo "$0 patch"
exit 1
fi
bash ./scripts/check-status.sh
if [ "$?" == "1" ];then exit 1;fi
# verification completed


cd pure
npm version $1


+ 34
- 0
scripts/check-status.sh Ver fichero

@@ -0,0 +1,34 @@
#!/bin/bash

RED='\033[0;31m'
NOCOLOR='\033[0m'

function check {
cd $1
git fetch origin
if [[ `git rev-parse master` != `git rev-parse origin/master` ]]; then
echo -e "${RED}$1 git repository is not clean${NOCOLOR}"
exit 1
fi
cd ..
}

echo "Check LessPass Repositories Statuses"

submodules="backend cli cordova core cozy desktop frontend move nginx pure snap webextension"
for submodule in ${submodules}
do
check $submodule &
done

FAIL=0
for job in `jobs -p`
do
wait $job || let "FAIL+=1"
done

if [ "$FAIL" != "0" ];
then
echo "One or more repositories are not clean, exiting..."
exit 1
fi

+ 5
- 2
scripts/release-webextensions.sh Ver fichero

@@ -1,17 +1,20 @@
#!/usr/bin/env bash

# context verification
if [ ! -f readme.md ]; then
echo "You seems to be in the wrong directory"
echo "Execute this script from the root of lesspass with ./scripts/release-webextensions.sh"
echo "Execute this script from the root of LessPass with ./scripts/${0##*/}"
exit 1
fi

if [ -z $1 ]; then
echo "Oops, you need to set a version in major.minor.patch"
echo "Example:"
echo "$0 patch"
exit 1
fi
bash ./scripts/check-status.sh
if [ "$?" == "1" ];then exit 1;fi
# verification completed

cd webextension
npm version $1


+ 3
- 1
scripts/zip-src-for-webextension.sh Ver fichero

@@ -1,10 +1,12 @@
#!/usr/bin/env bash

# context verification
if [ ! -f readme.md ]; then
echo "You seems to be in the wrong directory"
echo "Execute this script from the root of lesspass with ./scripts/zip-src-for-webextension.sh"
echo "Execute this script from the root of LessPass with ./scripts/${0##*/}"
exit 1
fi
# verification completed

CWD="$(pwd)"
cd webextension


+ 1
- 1
webextension

@@ -1 +1 @@
Subproject commit c55cbfaa302bc87cff8858f78faa3b89659b825a
Subproject commit a0af1d3856967fe8e720cbd3be252cd553e70924

Cargando…
Cancelar
Guardar