github.com/nuvolaris/nuv@v0.0.0-20240511174247-a74e3a52bfd8/tests/olaris/sub/vars/nuvfile.yml (about) 1 # Licensed to the Apache Software Foundation (ASF) under one 2 # or more contributor license agreements. See the NOTICE file 3 # distributed with this work for additional information 4 # regarding copyright ownership. The ASF licenses this file 5 # to you under the Apache License, Version 2.0 (the 6 # "License"); you may not use this file except in compliance 7 # with the License. You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, 12 # software distributed under the License is distributed on an 13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 # KIND, either express or implied. See the License for the 15 # specific language governing permissions and limitations 16 # under the License. 17 18 version: 3 19 20 dotenv: 21 - env 22 23 vars: 24 25 V: p2 26 27 OP: 28 sh: echo "{{.V}}" 29 30 OE: 31 sh: echo "$V" 32 33 34 env: 35 V: e2 36 37 OE: 38 sh: echo "$V" 39 40 OP: 41 sh: echo "{{.V}}" 42 43 E: 3 44 45 S: 46 sh: echo ${SS:-3} 47 48 V1: "{{or .V1 \"x\"}}" 49 50 tasks: 51 52 simple: 53 silent: true 54 desc: order 55 cmds: 56 - echo eV=$V pV={{.V}} 57 58 inner: 59 silent: true 60 desc: order 61 cmds: 62 - echo eV=$V pV={{.V}} 63 vars: 64 V: p3 65 env: 66 V: e3 67 68 prio: 69 silent: true 70 desc: priority 71 cmds: 72 - echo pOP={{.OP}} pOE={{.OE}} eOE=$OE eOP=$OP 73 74 env: 75 silent: true 76 desc: env 77 cmds: 78 - echo E=$E EE=$EE 79 80 saved: 81 silent: true 82 desc: saved 83 cmds: 84 - echo S=$S SS=$SS SSS=$SSS overriden SS=${SS:-5} 85 env: 86 SSS: 87 sh: echo ${SS:-4} 88 89 tmp: 90 silent: true 91 cmds: 92 - echo $NUV_TMP 93 94 clean: 95 silent: true 96 cmds: 97 - rm _*_ 98 99 v1v2: 100 silent: true 101 cmds: 102 - echo V1={{.V1}} V2={{.V2}} 103 104 save1: 105 silent: true 106 cmds: 107 - echo V1={{.V1}} >_v1_ 108 - | 109 if test -n "{{.V2}}" 110 then echo V2="{{.V2}}" >>_v1_ 111 fi 112 113 save2: 114 silent: true 115 cmds: 116 - echo V2={{.V2}} >_v2_