Explorar el Código

Add configuration for releases

master
Fen Dweller hace 5 años
padre
commit
6bad2055b4
Se han modificado 2 ficheros con 11 adiciones y 6 borrados
  1. +2
    -6
      config.json
  2. +9
    -0
      deploy-release.sh

+ 2
- 6
config.json Ver fichero

@@ -43,19 +43,15 @@
},
{
"id": "game-release",
"execute-command": "{{ getenv "WEBHOOK_SCRIPT_DIR" }}/deploy-branch.sh",
"execute-command": "{{ getenv "WEBHOOK_SCRIPT_DIR" }}/deploy-release.sh",
"command-working-directory": "/home/web/crux.sexy/",
"pass-arguments-to-command": [
{
"source": "payload",
"name": "repository.name"
},
{
"source": "payload",
"name": "ref"
}
],
"response-message": "Updating...",
"response-message": "Releasing...",
"trigger-rule": {
"match": {
"type": "value",


+ 9
- 0
deploy-release.sh Ver fichero

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

echo "Updating $1 to a new release"

cd $1

git fetch --tags
latest=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout ${latest}

Cargando…
Cancelar
Guardar