YARN-11078. Set env vars in a cross platform compatible way (#4432)
* Maven runs the ember build script. The environment variable TMPDIR was set as per bash syntax. * This failed on Windows since the Windows command prompt doesn't support bash syntax. * We're now detecting the OS and setting a Maven property "emberBuildScript" in a cross platform compatible way.
This commit is contained in:
parent
5a40224b53
commit
dc5460d525
@ -38,6 +38,34 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Pkck the appropriate ember build script to use in src/package.json based on the OS -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<exportAntProperties>true</exportAntProperties>
|
||||
<target>
|
||||
<!-- Set the Maven property emberBuildScript to build:mvn:windows if this is
|
||||
running on Windows. Set it to build:mvn otherwise. -->
|
||||
<condition property="emberBuildScript" value="build:mvn:windows" else="build:mvn">
|
||||
<and>
|
||||
<os family="windows"/>
|
||||
</and>
|
||||
</condition>
|
||||
<echo>Ember build script to use = ${emberBuildScript}</echo>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Apache RAT -->
|
||||
<plugin>
|
||||
<groupId>org.apache.rat</groupId>
|
||||
@ -229,7 +257,7 @@
|
||||
<arguments>
|
||||
<argument>${packageManagerScript}</argument>
|
||||
<argument>run</argument>
|
||||
<argument>build:mvn</argument>
|
||||
<argument>${emberBuildScript}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -10,7 +10,8 @@
|
||||
"scripts": {
|
||||
"build": "TMPDIR=tmp node ./node_modules/ember-cli/bin/ember build",
|
||||
"start": "TMPDIR=tmp node ./node_modules/ember-cli/bin/ember server",
|
||||
"build:mvn": "TMPDIR=tmp node/node ./node_modules/ember-cli/bin/ember build -prod"
|
||||
"build:mvn": "TMPDIR=tmp node/node ./node_modules/ember-cli/bin/ember build -prod",
|
||||
"build:mvn:windows": "set TMPDIR=tmp; node/node ./node_modules/ember-cli/bin/ember build -prod"
|
||||
},
|
||||
"repository": "",
|
||||
"engines": {
|
||||
|
Loading…
Reference in New Issue
Block a user