rename merge to squash and update branch names

This commit is contained in:
Actaeus Curabitur 2022-09-08 06:31:27 -05:00
parent 66bfffb930
commit b518fd1263
3 changed files with 28 additions and 6 deletions

View file

@ -3,17 +3,17 @@ git fetch --all;
#copy dev to history to ensure we don't lose changes if something goes wrong
git checkout history;
git reset --hard dev;
git reset --hard qual;
git push --force;
#merge to master
git checkout -B master origin/master;
git merge --squash dev;
git checkout -B prod origin/master;
git merge --squash qual;
git commit -am "$cm";
git push;
#clean dev
git checkout dev;
git reset --hard master;
git checkout qual;
git reset --hard prod;
git push --force;
git reset --hard origin/dev;
git reset --hard origin/qual;

18
states/test Normal file
View file

@ -0,0 +1,18 @@
{%- set branches=salt.cmd.shell('git ls-remote https://git.actcur.com/actcur/salt.git | grep -o -P "(?<=refs/heads/).*" | grep -Pv "(^temp$)|(^history$)"').split('\n') -%}
branches:
saltmaster:
{%- for branch in branches %}
- {{branch}}
{%- endfor %}
git:
{%- for branch in branches %}
salt_{{branch}}:
repo: "ssh://gitea@git.actcur.com:5022/actcur/salt.git"
path: "/srv/salt/{{branch}}"
branch: "{{branch}}"
key: "git_actcur"
force: {{ "True" if branch == "prod" else "false" }}
email: "actcur@actcur.com"
name: "Actaeus Curabitur"
{%- endfor %}

4
states/test.sls Normal file
View file

@ -0,0 +1,4 @@
/test:
file.managed:
- source: salt://test
- template: jinja