diff --git a/.all-contributorsrc b/.all-contributorsrc
new file mode 100644
index 0000000..4877286
--- /dev/null
+++ b/.all-contributorsrc
@@ -0,0 +1,74 @@
+{
+ "projectName": "Cake.Transifex",
+ "projectOwner": "cake-contrib",
+ "repoType": "github",
+ "repoHost": "https://github.com",
+ "files": [
+ "README.md"
+ ],
+ "imageSize": 100,
+ "commit": false,
+ "contributors": [
+ {
+ "login": "AdmiringWorm",
+ "name": "Kim J. Nordmo",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/1474648?v=4",
+ "profile": "https://github.com/AdmiringWorm",
+ "contributions": [
+ "maintenance"
+ ]
+ },
+ {
+ "login": "gep13",
+ "name": "Gary Ewan Park",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/1271146?v=4",
+ "profile": "http://www.gep13.co.uk/blog",
+ "contributions": [
+ "question",
+ "ideas",
+ "review"
+ ]
+ },
+ {
+ "login": "codetriage-readme-bot",
+ "name": "README Bot",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/35302948?v=4",
+ "profile": "https://www.codetriage.com",
+ "contributions": [
+ "doc"
+ ]
+ },
+ {
+ "login": "Jericho",
+ "name": "jericho",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/112710?v=4",
+ "profile": "https://github.com/Jericho",
+ "contributions": [
+ "ideas",
+ "question"
+ ]
+ },
+ {
+ "login": "mholo65",
+ "name": "Martin Björkström",
+ "avatar_url": "https://avatars1.githubusercontent.com/u/7863439?v=4",
+ "profile": "https://twitter.com/mholo65",
+ "contributions": [
+ "question"
+ ]
+ }
+ ],
+ "contributorsPerLine": 7,
+ "types": {
+ "bug": {
+ "symbol": "🐛",
+ "description": "Bug reports",
+ "link": "<%= options.repoHost %>/<%= options.projectOwner %>/<%= options.projectName %>/issues?q=author%3A<%= contributor.login %>+label%3Abug"
+ },
+ "ideas": {
+ "symbol": "🤔",
+ "description": "Ideas, Planning, & Feedback",
+ "link": "<%= options.repoHost %>/<%= options.projectOwner %>/<%= options.projectName %>/issues?q=author%3A<%= contributor.login %>"
+ }
+ }
+}
diff --git a/.appveyor.yml b/.appveyor.yml
index a5278ea..77fecdd 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -12,18 +12,18 @@ skip_commits:
- .travis.yml
image:
- Visual Studio 2017
-#- Ubuntu
-cache: tools -> setup.cake,appveyor.yml
+- Ubuntu
+cache: tools -> setup.cake,.appveyor.yml,setup.cake
install:
- cmd: cinst python3 -n
- cmd: cinst transifex-client
-- sh: sudo pip install transifex-client
+- sh: sudo -H pip install transifex-client
build_script:
- pwsh: |
if ($isLinux) {
- .\build.ps1 -Configuration Release -Target Package
+ .\build.ps1 --configuration=Release --target=AppVeyor-Linux
} else {
- .\build.ps1 -Configuration Release -Target AppVeyor
+ .\build.ps1 --configuration=Release --target=AppVeyor
}
test: off
deploy: off
diff --git a/.gitignore b/.gitignore
index 470fe47..3455108 100644
--- a/.gitignore
+++ b/.gitignore
@@ -294,3 +294,4 @@ BuildArtifacts/
*.dll
*.hash
docs/input/tasks/
+.dotnet/
\ No newline at end of file
diff --git a/GitVersion.yml b/GitVersion.yml
deleted file mode 100644
index 28840f4..0000000
--- a/GitVersion.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-branches:
- dev(elop)?(ment)?$:
- mode: ContinuousDelivery
- tag: alpha
-ignore:
- sha: []
diff --git a/LICENSE b/LICENSE
index 2a857c3..e20ffaf 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2017-2018 Kim J. Nordmo
+Copyright (c) 2017-2019 Kim J. Nordmo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 1eca6b8..7b812b2 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
# Cake.Transifex
+[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors)
[![license](https://img.shields.io/github/license/cake-contrib/Cake.Transifex.svg)](https://github.com/cake-contrib/Cake.Transifex/blob/master/LICENSE)
[![Open Source Helpers](https://www.codetriage.com/wormiecorp/cake.transifex/badges/users.svg)](https://www.codetriage.com/wormiecorp/cake.transifex)
@@ -8,7 +9,7 @@ This addin requires that the transifex client is already installed and is availa
## Information
-To install the transifex client, install python, then run `pip install transifex-client`, or using the chocolatey package `choco install transifex-client --version 0.12.4` *(version can be omitted when package have been approved)*.
+To install the transifex client, install python, then run `pip install transifex-client`, or using the chocolatey package `choco install transifex-client`.
| |Stable|Pre-release|
|:--:|:--:|:--:|
@@ -16,17 +17,21 @@ To install the transifex client, install python, then run `pip install transifex
|NuGet|[![NuGet](https://img.shields.io/nuget/v/Cake.Transifex.svg)](https://nuget.org/packages/Cake.Transifex)|[![NuGet Pre Release](https://img.shields.io/nuget/vpre/Cake.Transifex.svg)](https://nuget.org/packages/Cake.Transifex)|
### Where to get the addin
+
Officially published versions are available on [NuGet](https://www.nuget.org/packages/Cake.Transifex/).
-Development versions is available at the following nuget api endpoint:
+
+
+This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
\ No newline at end of file
diff --git a/build.config b/build.config
new file mode 100644
index 0000000..a816f2a
--- /dev/null
+++ b/build.config
@@ -0,0 +1,2 @@
+DOTNET_VERSION=ANY
+CAKE_VERSION=0.33.0
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
index 7718bc5..3d53e18 100644
--- a/build.ps1
+++ b/build.ps1
@@ -1,168 +1,126 @@
-##########################################################################
-# This is the Cake bootstrapper script for PowerShell.
-# This file was downloaded from https://github.com/cake-build/resources
-# Feel free to change this file to fit your needs.
-##########################################################################
-
-<#
-
-.SYNOPSIS
-This is a Powershell script to bootstrap a Cake build.
-
-.DESCRIPTION
-This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
-and execute your Cake build script with the parameters you provide.
-
-.PARAMETER Script
-The build script to execute.
-.PARAMETER Target
-The build script target to run.
-.PARAMETER Configuration
-The build configuration to use.
-.PARAMETER Verbosity
-Specifies the amount of information to be displayed.
-.PARAMETER ShowDescription
-Shows description about tasks.
-.PARAMETER DryRun
-Performs a dry run.
-.PARAMETER Experimental
-Uses the nightly builds of the Roslyn script engine.
-.PARAMETER Mono
-Uses the Mono Compiler rather than the Roslyn script engine.
-.PARAMETER CakeVersion
-The Cake version to use when running the build script.
-.PARAMETER UseNetCore
-The the CORE CLR edition of Cake.
-.PARAMETER ScriptArgs
-Remaining arguments are added here.
-
-.LINK
-https://cakebuild.net
-
-#>
-
-[CmdletBinding()]
-Param(
- [string]$Script = "setup.cake",
- [string]$Target,
- [string]$Configuration,
- [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
- [string]$Verbosity,
- [switch]$ShowDescription,
- [Alias("WhatIf", "Noop")]
- [switch]$DryRun,
- [switch]$Experimental,
- [switch]$Mono,
- [version]$CakeVersion = '0.25.0',
- [switch]$UseNetCore,
- [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
- [string[]]$ScriptArgs
-)
-
-if (!(Test-Path Function:\Expand-Archive)) {
- function Expand-Archive() {
- param([string]$Path, [string]$DestinationPath)
-
- if (!(Test-Path $DestinationPath)) { New-Item -Type Directory -Path $DestinationPath }
-
- $isPowershellCore = $PSVersionTable -and $PSVersionTable.PSEdition -eq 'Core'
- $haveNet45 = $PSVersionTable -and $PSVersionTable.CLRVersion -and ($PSVersionTable.CLRVersion -ge [version]'4.0.30319.17001')
-
- if ($isPowershellCore -or $haveNet45) {
- Add-Type -AssemblyName System.IO.Compression.FileSystem
- [System.IO.Compression.ZipFile]::ExtractToDirectory($Path, $DestinationPath)
- } else {
- $shellApplication = New-Object -ComObject shell.application
- $zipPackage = $shellApplication.namespace($Path)
- $destinationFolder = $shellApplication.namespace($DestinationPath)
- $destinationFolder.CopyHere($zipPackage.Items(), 16)
- }
+$SCRIPT_DIR = Split-Path -Parent $MyInvocation.MyCommand.Definition
+$TOOLS_DIR="$SCRIPT_DIR/tools"
+if ($IsMacOS -or $IsLinux) {
+ $CAKE_EXE="$TOOLS_DIR/dotnet-cake"
+} else {
+ $CAKE_EXE="$TOOLS_DIR/dotnet-cake.exe"
+}
+$CAKE_PATH="$TOOLS_DIR/.store/cake.tool/$CAKE_VERSION"
+$DOTNET_EXE="$(Get-Command dotnet -ea 0 | select -Expand Source)"
+$INSTALL_NETCORE=$false
+[string]$DOTNET_VERSION=""
+[string]$CAKE_VERSION=""
+foreach ($line in Get-Content "$SCRIPT_DIR/build.config" -Encoding utf8) {
+ if ($line -like "CAKE_VERSION=*") {
+ $CAKE_VERSION=$line.Substring($line.IndexOf('=') + 1)
+ }
+ elseif ($line -like "DOTNET_VERSION=*") {
+ $DOTNET_VERSION=$line.Substring($line.IndexOf('=') + 1)
}
}
-function GetProxyEnabledWebClient
-{
- $wc = New-Object System.Net.WebClient
- $proxy = [System.Net.WebRequest]::GetSystemWebProxy()
- $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
- $wc.Proxy = $proxy
- return $wc
+if ([string]::IsNullOrWhiteSpace($CAKE_VERSION) -or [string]::IsNullOrEmpty($DOTNET_VERSION)) {
+ "An errer occured while parsing Cake / .NET Core SDK version."
+ exit 1
}
-if (!$PSScriptRoot) { $PSScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition }
+if ([string]::IsNullOrWhiteSpace($DOTNET_EXE)) {
+ $INSTALL_NETCORE=$true
+}
+elseif ("$DOTNET_VERSION" -ne "ANY") {
+ $DOTNET_INSTALLED_VERSION= . $DOTNET_EXE --version
+ if ("$DOTNET_VERSION" -ne "$DOTNET_INSTALLED_VERSION") {
+ $INSTALL_NETCORE=$true
+ }
+}
-$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
-$CAKE_EXE_DIR = ""
+if ($true -eq $INSTALL_NETCORE) {
+ if (!(Test-Path "$SCRIPT_DIR/.dotnet")) {
+ New-Item -Path "$SCRIPT_DIR/.dotnet" -ItemType Directory -Force | Out-Null
+ }
-if ($UseNetCore) {
- $CAKE_DIR_NAME = "Cake.CoreCLR"
-} else {
- $CAKE_DIR_NAME = "Cake"
-}
+ $arguments = @()
+ $ScriptPath = ""
+ $LaunchUrl = ""
+ $ScriptUrl = ""
+ $PathSep = ';'
+ if ($IsMacOS -or $IsLinux) {
+ $ScriptPath = "$SCRIPT_DIR/.dotnet/dotnet-install.sh"
+ $ScriptUrl = "https://dot.net/v1/dotnet-install.sh"
+ $LaunchUrl = "$(Get-Command bash)"
+ $PathSep = ":"
+ $arguments = @(
+ $ScriptPath
+ "--install-dir"
+ "$SCRIPT_DIR/.dotnet"
+ "--no-path"
+ )
+ if ($DOTNET_VERSION -ne "ANY") {
+ $arguments += @(
+ "--version"
+ "$DOTNET_VERSION"
+ )
+ }
+ } else {
+ $ScriptPath = "$SCRIPT_DIR/.dotnet/dotnet-install.ps1"
+ $ScriptUrl = "https://dot.net/v1/dotnet-install.ps1"
+ $LaunchUrl = "$ScriptPath"
+ $arguments = @(
+ "-InstallDir"
+ "$SCRIPT_DIR/.dotnet"
+ "-NoPath"
+ )
+ if ($DOTNET_VERSION -ne "ANY") {
+ $arguments += @(
+ "-Version"
+ "$DOTNET_VERSION"
+ )
+ }
+ }
-$CAKE_URL = "https://www.nuget.org/api/v2/package/$($CAKE_DIR_NAME)/$($CakeVersion)"
+ (New-Object System.Net.WebClient).DownloadFile($ScriptUrl, $ScriptPath)
-if ($CakeVersion) {
- $CAKE_EXE_DIR = Join-Path "$TOOLS_DIR" "$CAKE_DIR_NAME.$($CakeVersion.ToString())"
-} else {
- $CAKE_EXE_DIR = Join-Path "$TOOLS_DIR" "$CAKE_DIR_NAME"
-}
+ & $LaunchUrl @arguments
-if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
- Write-Verbose "Creating tools directory..."
- New-Item -Path $TOOLS_DIR -Type Directory | Out-Null
-}
+ $env:PATH = "$SCRIPT_DIR/.dotnet${PathSep}${env:PATH}"
+ $env:DOTNET_ROOT = "$SCRIPT_DIR/.dotnet"
-if (!(Test-Path $CAKE_EXE_DIR)) {
- # We download and save it as a normal zip file, in cases
- # were we need to extract it using com.
- $tmpDownloadFile = Join-Path "$TOOLS_DIR" "$CAKE_DIR_NAME.zip"
- Write-Verbose "Downloading Cake package..."
-
- try {
- $wc = GetProxyEnabledWebClient
- $wc.DownloadFile($CAKE_URL, $tmpDownloadFile)
- } catch {
- throw "Could not download Cake package...`n`nException:$_"
- }
+ $DOTNET_EXE = Get-ChildItem -Path "$SCRIPT_DIR/.dotnet" -Filter "dotnet*" | select -First 1 -Expand FullName
- Write-Verbose "Extracting Cake package..."
- Expand-Archive -Path $tmpDownloadFile -DestinationPath $CAKE_EXE_DIR
- Remove-Item -Recurse -Force $tmpDownloadFile,"$CAKE_EXE_DIR/_rels","$CAKE_EXE_DIR/``[Content_Types``].xml","$CAKE_EXE_DIR/package"
+} elseif (Test-Path "/opt/dotnet/sdk" -ea 0) {
+ $env:DOTNET_ROOT = "/opt/dotnet/sdk"
}
-if ($UseNetCore) {
- $CAKE_EXE = Get-ChildItem -LiteralPath $CAKE_EXE_DIR -Filter "Cake.dll" -Recurse | Select-Object -First 1 -ExpandProperty FullName
- if (!$CAKE_EXE) { throw "Unable to find the Cake.dll library" }
+$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
+$env:DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
+
+$CAKE_INSTALLED_VERSION= Get-Command dotnet-cake -ea 0 | % { & $_.Source --version }
+
+if ($CAKE_INSTALLED_VERSION -eq $CAKE_VERSION) {
+ $CAKE_EXE = Get-Command dotnet-cake | % Source
} else {
- $CAKE_EXE = Get-ChildItem -LiteralPath $CAKE_EXE_DIR -Filter "Cake.exe" -Recurse | Select-Object -First 1 -ExpandProperty FullName
- if (!$CAKE_EXE) { throw "Unable to find the Cake.exe executable" }
-}
+ $CakePath = "$TOOLS_DIR/.store/cake.tool/$CAKE_VERSION"
+ $CAKE_EXE = (Get-ChildItem -Path $TOOLS_DIR -Filter "dotnet-cake*" -File -ea 0 | select -First 1 -Expand FullName)
+
+ if (!(Test-Path -Path $CakePath -PathType Container) -or !(Test-Path $CAKE_EXE -PathType Leaf)) {
+ if (!([string]::IsNullOrWhiteSpace($CAKE_EXE)) -and (Test-Path $CAKE_EXE -PathType Leaf)) {
+ & $DOTNET_EXE tool uninstall --tool-path $TOOLS_DIR Cake.Tool
+ }
-$cakeArguments = New-Object System.Collections.Generic.List[string]
-$cakeArguments.Add($Script) | Out-Null
-$excludeArgs = @("Script","CakeVersion","UseNetCore","ScriptArgs", "Verbose")
+ & $DOTNET_EXE tool install --tool-path $TOOLS_DIR --version $CAKE_VERSION Cake.Tool
+ if ($LASTEXITCODE -ne 0) {
+ "An error occured while installing Cake."
+ exit 1
+ }
-$PSBoundParameters.GetEnumerator() | ? { !$excludeArgs.Contains($_.Key) } | % {
- if ($_.Value) {
- $cakeArguments.Add("-$($_.Key)=$($_.Value)")
- } else {
- $cakeArguments.Add("-$($_.Key)")
+ $CAKE_EXE = (Get-ChildItem -Path $TOOLS_DIR -Filter "dotnet-cake*" -File | select -First 1 -Expand FullName)
}
-} | Out-Null
-if ($ScriptArgs) {
- $cakeArguments.AddRange($ScriptArgs) | Out-Null
}
-if ($UseNetCore) {
- $cakeArguments.Insert(0, $CAKE_EXE) | Out-Null
- $CAKE_EXE = Get-Command -Name dotnet | ForEach-Object Definition
-} elseif ([System.Environment]::OSVersion.Platform -ne [System.PlatformID]::Win32NT) {
- $cakeArguments.Insert(0, $CAKE_EXE) | Out-Null
- $CAKE_EXE = Get-Command -Name mono | ForEach-Object Definition
+& "$CAKE_EXE" setup.cake --bootstrap
+if ($LASTEXITCODE -eq 0) {
+ & "$CAKE_EXE" setup.cake $args
}
-Write-Host "Running build script..."
-Write-Verbose "Calling & $CAKE_EXE $cakeArguments"
-& $Cake_EXE $cakeArguments
-exit $LASTEXITCODE
+exit $LASTEXITCODE
\ No newline at end of file
diff --git a/build.sh b/build.sh
old mode 100644
new mode 100755
index 01d34b4..0e594ff
--- a/build.sh
+++ b/build.sh
@@ -1,117 +1,78 @@
#!/usr/bin/env bash
-##########################################################################
-# This is the Cake bootstrapper script for Linux and OS X.
-# This file was downloaded from https://github.com/cake-build/resources
-# Feel free to change this file to fit your needs.
-##########################################################################
-
-# Define directories.
+# Define variables
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source $SCRIPT_DIR/build.config
TOOLS_DIR=$SCRIPT_DIR/tools
-ADDINS_DIR=$TOOLS_DIR/Addins
-MODULES_DIR=$TOOLS_DIR/Modules
-NUGET_EXE=$TOOLS_DIR/nuget.exe
-CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
-PACKAGES_CONFIG=$TOOLS_DIR/packages.config
-PACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum
-ADDINS_PACKAGES_CONFIG=$ADDINS_DIR/packages.config
-MODULES_PACKAGES_CONFIG=$MODULES_DIR/packages.config
-
-# Define md5sum or md5 depending on Linux/OSX
-MD5_EXE=
-if [[ "$(uname -s)" == "Darwin" ]]; then
- MD5_EXE="md5 -r"
-else
- MD5_EXE="md5sum"
-fi
-
-# Define default arguments.
-SCRIPT="setup.cake"
-CAKE_ARGUMENTS=()
-
-# Parse arguments.
-for i in "$@"; do
- case $1 in
- -s|--script) SCRIPT="$2"; shift ;;
- --) shift; CAKE_ARGUMENTS+=("$@"); break ;;
- *) CAKE_ARGUMENTS+=("$1") ;;
- esac
- shift
-done
+CAKE_EXE=$TOOLS_DIR/dotnet-cake
+CAKE_PATH=$TOOLS_DIR/.store/cake.tool/$CAKE_VERSION
+DOTNET_EXE=$(which dotnet 2>/dev/null)
+INSTALL_NETCORE=0
-# Make sure the tools folder exist.
-if [ ! -d "$TOOLS_DIR" ]; then
- mkdir "$TOOLS_DIR"
+if [ "$CAKE_VERSION" = "" ] || [ "$DOTNET_VERSION" = "" ]; then
+ echo "An error occured while parsing Cake / .NET Core SDK version."
+ exit 1
fi
-# Make sure that packages.config exist.
-if [ ! -f "$TOOLS_DIR/packages.config" ]; then
- echo "Downloading packages.config..."
- curl -Lsfo "$TOOLS_DIR/packages.config" https://cakebuild.net/download/bootstrapper/packages
- if [ $? -ne 0 ]; then
- echo "An error occurred while downloading packages.config."
- exit 1
+if [ "$DOTNET_EXE" = "" ]; then
+ INSTALL_NETCORE=1
+elif [ "$DOTNET_VERSION" != "ANY" ]; then
+ DOTNET_INSTALLED_VERSION=$($DOTNET_EXE --version 2>&1)
+ if [ "$DOTNET_VERSION" != "$DOTNET_INSTALLED_VERSION" ]; then
+ $INSTALL_NETCORE=1
fi
fi
-# Download NuGet if it does not exist.
-if [ ! -f "$NUGET_EXE" ]; then
- echo "Downloading NuGet..."
- curl -Lsfo "$NUGET_EXE" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- if [ $? -ne 0 ]; then
- echo "An error occurred while downloading nuget.exe."
- exit 1
+if [ "$INSTALL_NETCORE" = "1" ]; then
+ if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then
+ mkdir "$SCRIPT_DIR/.dotnet"
fi
-fi
-
-# Restore tools from NuGet.
-pushd "$TOOLS_DIR" >/dev/null
-if [ ! -f "$PACKAGES_CONFIG_MD5" ] || [ "$( cat "$PACKAGES_CONFIG_MD5" | sed 's/\r$//' )" != "$( $MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' )" ]; then
- find . -type d ! -name . ! -name 'Cake.Bakery' | xargs rm -rf
-fi
+ curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh
-mono "$NUGET_EXE" install -ExcludeVersion
-if [ $? -ne 0 ]; then
- echo "Could not restore NuGet tools."
- exit 1
+ if [ "$DOTNET_VERSION" = "ANY" ]; then
+ bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --install-dir "$SCRIPT_DIR/.dotnet" --no-path
+ else
+ bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version $DOTNET_VERSION --install-dir "$SCRIPT_DIR/.dotnet" --no-path
+ fi
+
+ DOTNET_EXE="$SCRIPT_DIR/.dotnet/dotnet"
+ export PATH="$SCRIPT_DIR/.dotnet:$PATH"
+ export DOTNET_ROOT="$SCRIPT_DIR/.dotnet"
+elif [ -d "/opt/dotnet/sdk" ]; then # Fix for dotnet-cake not finding sdk version
+ export DOTNET_ROOT="/opt/dotnet"
fi
-$MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' >| "$PACKAGES_CONFIG_MD5"
+export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+export DOTNET_CLI_TELEMETRY_OPTOUT=1
-popd >/dev/null
+CAKE_INSTALLED_VERSION=$(dotnet-cake --version 2>&1)
-# Restore addins from NuGet.
-if [ -f "$ADDINS_PACKAGES_CONFIG" ]; then
- pushd "$ADDINS_DIR" >/dev/null
+if [ "$CAKE_VERSION" != "$CAKE_INSTALLED_VERSION" ]; then
+ if [ ! -f "$CAKE_EXE" ] || [ ! -d "$CAKE_PATH" ]; then
+ if [ -f "$CAKE_EXE" ]; then
+ dotnet tool uninstall --tool-path $TOOLS_DIR Cake.Tool
+ fi
- mono "$NUGET_EXE" install -ExcludeVersion
- if [ $? -ne 0 ]; then
- echo "Could not restore NuGet addins."
- exit 1
+ echo "Installing Cake $CAKE_VERSION..."
+ dotnet tool install --tool-path $TOOLS_DIR --version $CAKE_VERSION Cake.Tool
+ if [ $? -ne 0 ]; then
+ echo "An error occured while installing Cake."
+ exit 1
+ fi
fi
- popd >/dev/null
-fi
-
-# Restore modules from NuGet.
-if [ -f "$MODULES_PACKAGES_CONFIG" ]; then
- pushd "$MODULES_DIR" >/dev/null
-
- mono "$NUGET_EXE" install -ExcludeVersion
- if [ $? -ne 0 ]; then
- echo "Could not restore NuGet modules."
+ # Make sure that Cake has been installed.
+ if [ ! -f "$CAKE_EXE" ]; then
+ echo "Could not find Cake.exe at '$CAKE_EXE'."
exit 1
fi
-
- popd >/dev/null
+else
+ CAKE_EXE="dotnet-cake"
fi
-# Make sure that Cake has been installed.
-if [ ! -f "$CAKE_EXE" ]; then
- echo "Could not find Cake.exe at '$CAKE_EXE'."
- exit 1
-fi
+###########################################################################
+# RUN BUILD SCRIPT
+###########################################################################
# Start Cake
-exec mono "$CAKE_EXE" $SCRIPT "${CAKE_ARGUMENTS[@]}"
+(exec "$CAKE_EXE" setup.cake --bootstrap) && (exec "$CAKE_EXE" setup.cake "$@")
diff --git a/docs/input/blog/new-release-0.1.0.md b/docs/input/blog/new-release-0.1.0.md
deleted file mode 100644
index ba98045..0000000
--- a/docs/input/blog/new-release-0.1.0.md
+++ /dev/null
@@ -1,16 +0,0 @@
----
-Title: New Release - 0.1.0
-Published: 2017-03-11
-Category: Release
-Author: AdmiringWorm
----
-
-# 0.1.0 Release
-
-I'm happy to anounce the first public release of the Cake.Transifex library.
-
-In this release, the following issue was resolved:
-
-__Feature__
-
-- [__#1__](https://github.com/WormieCorp/Cake.Transifex/issues/1) Initial Release
diff --git a/docs/input/blog/new-release-0.2.0.md b/docs/input/blog/new-release-0.2.0.md
deleted file mode 100644
index 34bbe60..0000000
--- a/docs/input/blog/new-release-0.2.0.md
+++ /dev/null
@@ -1,16 +0,0 @@
----
-Title: New Release - 0.2.0
-Published: 2017-05-17
-Category: Release
-Author: AdmiringWorm
----
-
-# 0.2.0 Release
-
-As part of this release we had [1 issue](https://github.com/WormieCorp/Cake.Transifex/issues?milestone=2&state=closed) closed.
-
-
-__Enhancement__
-
-- [__#4__](https://github.com/WormieCorp/Cake.Transifex/issues/4) Support additional modes when pulling translations
-
diff --git a/docs/input/blog/new-release-0.3.0.md b/docs/input/blog/new-release-0.3.0.md
deleted file mode 100644
index 977260c..0000000
--- a/docs/input/blog/new-release-0.3.0.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-Title: New Release - 0.3.0
-Published: 2017-08-01
-Category: Release
-Author: AdmiringWorm
----
-
-# 0.3.0 Release
-
-As part of this release we had [58 commits](https://github.com/cake-contrib/Cake.Transifex/compare/v0.1.0...0.3.0) which resulted in [8 issues](https://github.com/cake-contrib/Cake.Transifex/issues?milestone=3&state=closed) being closed.
-
-
-__Feature__
-
-- [__#7__](https://github.com/cake-contrib/Cake.Transifex/issues/7) Support the 'Init' command
-
-__Improvements__
-
-- [__#10__](https://github.com/cake-contrib/Cake.Transifex/issues/10) Build against Cake.Core version 16.2
-- [__#9__](https://github.com/cake-contrib/Cake.Transifex/issues/9) Start using Cake.Recipe for windows builds
-- [__#6__](https://github.com/cake-contrib/Cake.Transifex/issues/6) Use the Cake Contrib Icon
-
-__Documentation__
-
-- [__#13__](https://github.com/cake-contrib/Cake.Transifex/issues/13) Update Readme to be similiar to other Cake addins
-- [__#12__](https://github.com/cake-contrib/Cake.Transifex/issues/12) Configure gitreleasemanager to add package nuget url on releases
-- [__#11__](https://github.com/cake-contrib/Cake.Transifex/issues/11) Start using wyam to document the addin
-
-### Where to get it
-You can download this release from [nuget](https://nuget.org/packages/Cake.Transifex/0.3.0)
diff --git a/docs/input/blog/new-release-0.4.0.md b/docs/input/blog/new-release-0.4.0.md
deleted file mode 100644
index 5fbf254..0000000
--- a/docs/input/blog/new-release-0.4.0.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-Title: New Release - 0.4.0
-Published: 2017-12-18
-Category: Release
-Author: AdmiringWorm
----
-
-# 0.4.0 Compatibility Release
-
-This blog post is a little belated, but here it is.
-This release is just a minor compatibility release to make Cake.Transifex
-compatible with Cake above version 0.22, while maintaining compatibility with
-previous releases.
-
-
-## Release Notes
-
-As part of this release we had [9 commits](https://github.com/cake-contrib/Cake.Transifex/compare/0.3.0...0.4.0) which resulted in [2 issues](https://github.com/cake-contrib/Cake.Transifex/issues?milestone=4&state=closed) being closed.
-
-
-__Feature__
-
-- [__#16__](https://github.com/cake-contrib/Cake.Transifex/issues/16) Update Cake.Core dependency to version 0.22.0
-
-### Where to get it
-You can download this release from [nuget](https://nuget.org/packages/Cake.Transifex/0.4.0)
diff --git a/docs/input/blog/new-release-0.5.0.md b/docs/input/blog/new-release-0.5.0.md
deleted file mode 100644
index 8c63075..0000000
--- a/docs/input/blog/new-release-0.5.0.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-Title: New Release - 0.5.0
-Published: 2018-03-03
-Category: Release
-Author: AdmiringWorm
----
-
-# 0.5.0 Compatibility Release
-The main feature of this release is adding the support for Cake version 0.26.0.
-The project have also now been setup as a example project with pulling/pushing translations to transifex (these are also included in the package).
-
-EDIT:
-It turns out this support, was only for partial support for Cake version 0.26.0.
-It is only supported when targeting .NET Core 2.0, and not when targeting the full .NET Framework.
-
-## Release notes
-
-As part of this release we had [22 commits](https://github.com/cake-contrib/Cake.Transifex/compare/0.4.0...0.5.0) which resulted in [5 issues](https://github.com/cake-contrib/Cake.Transifex/issues?milestone=6&state=closed) being closed.
-
-
-__Feature__
-
-- [__#22__](https://github.com/cake-contrib/Cake.Transifex/issues/22) Support Cake.Core 0.26
-
-__Improvement__
-
-- [__#20__](https://github.com/cake-contrib/Cake.Transifex/issues/20) Change all hard coded strings to translatable strings
-
-__Documentation__
-
-- [__#23__](https://github.com/cake-contrib/Cake.Transifex/issues/23) Updated documentation to the correct .NET Core and .NET Framework versions
-- [__#19__](https://github.com/cake-contrib/Cake.Transifex/issues/19) Mention which cake versions are supported in wyam documentation.
-- [__#18__](https://github.com/cake-contrib/Cake.Transifex/issues/18) Documentation in Readme.md is outdated
-
-### Where to get it
-You can download this release from [nuget](https://nuget.org/packages/Cake.Transifex/0.5.0)
diff --git a/docs/input/blog/new-release-0.6.0.md b/docs/input/blog/new-release-0.6.0.md
deleted file mode 100644
index 0865def..0000000
--- a/docs/input/blog/new-release-0.6.0.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-Title: New Release - 0.5.0
-Published: 2018-03-03
-Category: Release
-Author: AdmiringWorm
----
-
-# 0.6.0 The breaking change release
-Due to misunderstanding of the requirements, the previously released version only added partial support for Cake version 0.26.0.
-This release fixes that, but unfortunately includes breaking changes due to this.
-It was also decided to remove all support for cake versions released prior to version 0.26.0.
-
-## Release notes
-
-As part of this release we had [9 commits](https://github.com/cake-contrib/Cake.Transifex/compare/0.5.0...0.6.0) which resulted in [2 issues](https://github.com/cake-contrib/Cake.Transifex/issues?milestone=7&state=closed) being closed.
-
-
-__Breaking Changes__
-
-- [__#25__](https://github.com/cake-contrib/Cake.Transifex/issues/25) Add full support for Cake version 0.26.0 and above
-- [__#24__](https://github.com/cake-contrib/Cake.Transifex/issues/24) Drop support for versions of Cake previous to 0.26.0
-
-### Where to get it
-You can download this release from [nuget](https://nuget.org/packages/Cake.Transifex/0.6.0)
diff --git a/docs/input/docs/usage/intro.md b/docs/input/docs/usage/intro.md
index f003f08..710ee80 100644
--- a/docs/input/docs/usage/intro.md
+++ b/docs/input/docs/usage/intro.md
@@ -21,6 +21,5 @@ This addin is designed to be used inside of cake scripts. To start using it, fir
When the cake script is run, this will download the latest version of the `Cake.Transifex` nuget package and will now be available to use inside of the script.
-
*NOTE: Remember to also install the transifex (`tx`) client on the running computer, this can be installed through
the python `pip` utility (`pip install transifex-client`) or through chocolatey `choco install transifex-client`.*
diff --git a/docs/input/index.cshtml b/docs/input/index.cshtml
index 71ed743..8e41cfc 100644
--- a/docs/input/index.cshtml
+++ b/docs/input/index.cshtml
@@ -19,21 +19,14 @@ NoGutter: false
NuGet
.
While development versions are made available using the following nuget end point:
-
- https://www.myget.org/F/cake-contrib/api/v2
+
+ https://ci.appveyor.com/nuget/cake-transifex
Kim J. Nordmo
🚧
Gary Ewan Park
💬 🤔 👀
README Bot
📖
jericho
🤔 💬
Martin Björkström
💬
- This addin supports multiple frameworks and with that multiple Cake versions - The following is a list of the Cake versions this addin is expected to work with. + This addin makes use of the .NET Standard 2.0 framework, which should work + on both .NET Core 2.0+, and .NET Framework 4.6+.
-