-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #787 from shlinkio/develop
Release v2.2.2
- Loading branch information
Showing
11 changed files
with
179 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
# install latest docker version | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | ||
apt-get update | ||
apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce | ||
|
||
# enable multiarch execution | ||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# PLATFORMS="linux/arm/v7,linux/arm64/v8,linux/amd64" | ||
PLATFORMS="linux/amd64" | ||
DOCKER_IMAGE="shlinkio/shlink" | ||
BUILDX_VER=v0.4.1 | ||
export DOCKER_CLI_EXPERIMENTAL=enabled | ||
|
||
mkdir -vp ~/.docker/cli-plugins/ ~/dockercache | ||
curl --silent -L "https://github.com/docker/buildx/releases/download/${BUILDX_VER}/buildx-${BUILDX_VER}.linux-amd64" > ~/.docker/cli-plugins/docker-buildx | ||
chmod a+x ~/.docker/cli-plugins/docker-buildx | ||
|
||
docker buildx create --use | ||
|
||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
|
||
# If there is a tag, regardless the branch, build that docker tag and also "stable" | ||
if [[ ! -z $TRAVIS_TAG ]]; then | ||
docker build --build-arg SHLINK_VERSION=${TRAVIS_TAG#?} -t shlinkio/shlink:${TRAVIS_TAG#?} -t shlinkio/shlink:stable . | ||
docker push shlinkio/shlink:${TRAVIS_TAG#?} | ||
|
||
TAGS="-t ${DOCKER_IMAGE}:${TRAVIS_TAG#?}" | ||
# Push stable tag only if this is not an alpha or beta tag | ||
[[ $TRAVIS_TAG != *"alpha"* && $TRAVIS_TAG != *"beta"* ]] && docker push shlinkio/shlink:stable | ||
[[ $TRAVIS_TAG != *"alpha"* && $TRAVIS_TAG != *"beta"* ]] && TAGS="${TAGS} -t ${DOCKER_IMAGE}:stable" | ||
|
||
docker buildx build --push \ | ||
--build-arg SHLINK_VERSION=${TRAVIS_TAG#?} \ | ||
--platform ${PLATFORMS} \ | ||
${TAGS} . | ||
|
||
# If build branch is develop, build latest (on master, when there's no tag, do not build anything) | ||
elif [[ "$TRAVIS_BRANCH" == 'develop' ]]; then | ||
docker build -t shlinkio/shlink:latest . | ||
docker push shlinkio/shlink:latest | ||
docker buildx build --push \ | ||
--platform ${PLATFORMS} \ | ||
-t ${DOCKER_IMAGE}:latest . | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shlinkio\Shlink\Core\Util; | ||
|
||
use Cocur\Slugify\SlugifyInterface; | ||
use Symfony\Component\String\AbstractUnicodeString; | ||
use Symfony\Component\String\Slugger\SluggerInterface; | ||
|
||
use function Symfony\Component\String\s; | ||
|
||
class CocurSymfonySluggerBridge implements SluggerInterface | ||
{ | ||
private SlugifyInterface $slugger; | ||
|
||
public function __construct(SlugifyInterface $slugger) | ||
{ | ||
$this->slugger = $slugger; | ||
} | ||
|
||
public function slug(string $string, string $separator = '-', ?string $locale = null): AbstractUnicodeString | ||
{ | ||
return s($this->slugger->slugify($string, $separator)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters