Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix license directory Linux check #96

Merged
merged 2 commits into from
Jun 14, 2021
Merged

Conversation

Azurelol
Copy link
Contributor

Description

The current check fails on the CI for Linux since there's no license directory (it was returning null)

Changes

  • UPDATE UnityPLuginConventions

licensePath = UnityPluginConventions.UNITY_LICENSE_DIRECTORY_MAC_OS
}
else{
licensePath = new File("")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me check the correct path on Linux

* {@code File} to Unity license directory on macOS.
* @value "/Library/Application Support/Unity/"
*/
static File UNITY_LICENSE_DIRECTORY_LINUX = new File(".local/share/unity3d/Unity/")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to be carefull here. We should use the $HOME variable or the system property user.home to create a absolute path based on the user home.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it would be $HOME/shared/... ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. Either "${System.env("HOME")}/.local/.... or "${System.getProperty("user.home")}/.local/...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SO says the property way is the best
https://stackoverflow.com/a/586345/1380824

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Jenkinsfile Outdated
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Library('github.com/wooga/atlas-jenkins-pipeline@1.x') _
@Library('github.com/wooga/atlas-jenkins-pipeline@1.20.x') _
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be reverted again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Azurelol Azurelol force-pushed the fix/license_dir_osx_check branch 2 times, most recently from d64384b to 1747561 Compare June 14, 2021 08:15
@Larusso Larusso merged commit 6209bab into release/2.x Jun 14, 2021
@Larusso Larusso deleted the fix/license_dir_osx_check branch June 14, 2021 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants