Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- LOCK_BRANCH="66.66.66"
- #Adding a new subnode to certain nodes
- xmlstarlet ed -L --subnode "/configurations/rules" --type elem -n rule config.xml
- #Adding text to the new node
- xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n name -v "$LOCK_BRANCH" config.xml
- xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n repo -v "mqm" config.xml
- xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n branch -v "refs/heads/12.55.99" config.xml
- xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n emailTo -v "imichael@gmail.com" config.xml
- xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n path -v "Server/.*/schema/v.*/.*/.*-dbSchemaDescriptor.xml,Server/.*/resources/" config.xml
- <?xml version="1.0" encoding="utf-8" standalone="no"?>
- <configurations>
- <smtpHost>smtp3.gmail.com</smtpHost>
- <smtpPort>25</smtpPort>
- <emailFrom>GitPushNotifier@gmail.com</emailFrom>
- <emailSubject>Push notification</emailSubject>
- <!-- Stash general URL-->
- <gitViewerURL>http://server0005.gmail.net:7990/projects/</gitViewerURL>
- <rule>
- <name>test_12.55.4</name>
- <repo>test</repo>
- <branch>refs/heads/12.55.4</branch>
- <emailTo>test@gmail.com</emailTo>
- <path>Server/.*/resources/schema/v.*/.*/.*-dbSchemaDescriptor.xml,Server/.*/resources/SpringIOC/dataupgrader/v.*/.*/.*-dataUpgrader.xml,Server/.*/java/com/hp/test/dataupgrader/v.*/.*/.*.java,Server/.*/resources/indexes/v.*/.*.index,Server/.*/resources/SpringIOC/vanilla/.*.xml</path>
- </rule>
- <rule>
- <name>test_12.55.10</name>
- <repo>test</repo>
- <branch>refs/heads/12.55.10</branch>
- <emailTo>test@gmail.com</emailTo>
- <path>Server/.*/resources/schema/v.*/.*/.*-dbSchemaDescriptor.xml,Server/.*/resources/SpringIOC/dataupgrader/v.*/.*/.*-dataUpgrader.xml,Server/.*/java/com/hp/test/dataupgrader/v.*/.*/.*.java,Server/.*/resources/indexes/v.*/.*.index,Server/.*/resources/SpringIOC/vanilla/.*.xml</path>
- </rule>
- <rule>
- <name>test_12.55.6</name>
- <repo>test</repo>
- <branch>refs/heads/12.55.6</branch>
- <emailTo>test@gmail.com</emailTo>
- <path>Server/.*/resources/schema/v.*/.*/.*-dbSchemaDescriptor.xml,Server/.*/resources/SpringIOC/dataupgrader/v.*/.*/.*-dataUpgrader.xml,Server/.*/java/com/hp/test/dataupgrader/v.*/.*/.*.java,Server/.*/resources/indexes/v.*/.*.index,Server/.*/resources/SpringIOC/vanilla/.*.xml</path>
- </rule>
- </configurations>
Add Comment
Please, Sign In to add comment