Skip to content

Instantly share code, notes, and snippets.

@ifnull
ifnull / envs.sh
Created September 25, 2020 23:13
Continuous Integration for Unity with CircleCI - Sample File
export UNITY_VERSION=2019.1.12f1
export UNITY_USERNAME=username@email.com
export UNITY_PASSWORD=********
export UNITY_CIPHER=change_me_to_anything_secure
export UNITY_VERSION=2019.1.12f1
export UNITY_USERNAME=username@email.com
export UNITY_PASSWORD=********
export UNITY_CIPHER=change_me_to_anything_secure
export BUILD_TARGET=StandaloneWindows64;
export BUILD_NAME=projectname-;
export CIRCLE_BUILD_NUM=00;
export CIRCLE_USERNAME=localhost;
export CIRCLE_BRANCH=test;
./bin/build.sh
@ifnull
ifnull / BuildCommand.cs
Created September 25, 2020 23:11
Continuous Integration for Unity with CircleCI - Sample File
using UnityEditor;
using System.Linq;
using System;
static class BuildCommand
{
static string GetArgument (string name)
{
string[] args = Environment.GetCommandLineArgs ();
for (int i = 0; i < args.Length; i++) {
if (args [i].Contains (name)) {
@ifnull
ifnull / build.sh
Created September 25, 2020 23:10
Continuous Integration for Unity with CircleCI - Sample Files
#!/usr/bin/env bash
set -e
set -x
echo "Building for $BUILD_TARGET"
export BUILD_PATH=./Builds/$CIRCLE_BRANCH/$CIRCLE_BUILD_NUM/$BUILD_TARGET/
mkdir -p $BUILD_PATH
echo "Initialize manual license file..."
/opt/Unity/Editor/Unity \\
-quit \\
-batchmode \\
@ifnull
ifnull / before_script.sh
Created September 25, 2020 23:09
Continuous Integration for Unity with CircleCI - Sample File
#!/usr/bin/env bash
set -e
set -x
mkdir -p /root/.cache/unity3d
mkdir -p /root/.local/share/unity3d/Unity/
set +x
apt-get update && apt-get install -y pulseaudio
@ifnull
ifnull / config.yml
Last active September 25, 2020 23:08
Continuous Integration for Unity with CircleCI - Sample File
version: 2.1
orbs:
aws-s3: circleci/aws-s3@1.0.11
references:
docker_image: &docker_image
docker:
- image: gableroux/unity3d:2019.1.12f1 # unity3d.x.ulf-enc is fixed to this version
setup_unity_license_env_var: &setup_unity_license_env_var
command: |
openssl version
@ifnull
ifnull / s3-iam-policy.json
Created September 25, 2020 23:05
Continuous Integration for Unity with CircleCI - Sample File
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListAllMyBuckets"
],
"Resource": "*"
@ifnull
ifnull / encrypt_unity_license.sh
Created September 25, 2020 23:04
Continuous Integration for Unity with CircleCI - Sample File
docker run --rm \\
--workdir "/root/project/.circleci/" \\
--volume "$(pwd):/root/project" \\
gableroux/unity3d:$UNITY_VERSION \\
bash -c 'find -name "Unity*.ulf" -exec cp {} unity3d.x.ulf \\;'
docker run --rm \\
--env UNITY_CIPHER \\
--workdir "/root/project/.circleci/" \\
--volume "$(pwd):/root/project" \\
@ifnull
ifnull / activate_unity_license.sh
Created September 25, 2020 23:01
Continuous Integration for Unity with CircleCI - Sample File
mkdir /.circleci/;
docker run -it --rm \\
--env UNITY_USERNAME \\
--env UNITY_PASSWORD \\
--env "TEST_PLATFORM=linux" \\
--workdir "/root/project/.circleci/" \\
--volume "$(pwd):/root/project" \\
gableroux/unity3d:$UNITY_VERSION \\
bash -c '/opt/Unity/Editor/Unity -quit -nographics -logFile /tmp/unity-createManualActivationFile.log -batchmode -createManualActivationFile -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD"; find -name "Unity*" -exec mv {} unity3d.alf \\;'
@ifnull
ifnull / robots.txt
Created February 21, 2019 18:05
Simple robots.txt file for Wordpress
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php