mirror of
https://github.com/linuxserver/docker-unifi-network-application.git
synced 2025-03-05 20:59:58 -08:00
Fix release detection
This commit is contained in:
parent
f059961c17
commit
920455dc72
2
.github/workflows/external_trigger.yml
vendored
2
.github/workflows/external_trigger.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
||||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "> External trigger running off of main branch. To disable this trigger, add \`unifi-network-application_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
echo "> External trigger running off of main branch. To disable this trigger, add \`unifi-network-application_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
||||||
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
|
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
|
||||||
EXT_RELEASE=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages |grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}')
|
EXT_RELEASE=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages.gz | gunzip | grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}')
|
||||||
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
|
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
|
||||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
|
@ -23,7 +23,8 @@ RUN \
|
||||||
unzip && \
|
unzip && \
|
||||||
echo "**** install unifi ****" && \
|
echo "**** install unifi ****" && \
|
||||||
if [ -z ${UNIFI_VERSION+x} ]; then \
|
if [ -z ${UNIFI_VERSION+x} ]; then \
|
||||||
UNIFI_VERSION=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
|
UNIFI_VERSION=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages.gz \
|
||||||
|
| gunzip \
|
||||||
| grep -A 7 -m 1 'Package: unifi' \
|
| grep -A 7 -m 1 'Package: unifi' \
|
||||||
| awk -F ': ' '/Version/{print $2;exit}' \
|
| awk -F ': ' '/Version/{print $2;exit}' \
|
||||||
| awk -F '-' '{print $1}'); \
|
| awk -F '-' '{print $1}'); \
|
||||||
|
|
|
@ -23,7 +23,8 @@ RUN \
|
||||||
unzip && \
|
unzip && \
|
||||||
echo "**** install unifi ****" && \
|
echo "**** install unifi ****" && \
|
||||||
if [ -z ${UNIFI_VERSION+x} ]; then \
|
if [ -z ${UNIFI_VERSION+x} ]; then \
|
||||||
UNIFI_VERSION=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
|
UNIFI_VERSION=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages.gz \
|
||||||
|
| gunzip \
|
||||||
| grep -A 7 -m 1 'Package: unifi' \
|
| grep -A 7 -m 1 'Package: unifi' \
|
||||||
| awk -F ': ' '/Version/{print $2;exit}' \
|
| awk -F ': ' '/Version/{print $2;exit}' \
|
||||||
| awk -F '-' '{print $1}'); \
|
| awk -F '-' '{print $1}'); \
|
||||||
|
|
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
|
@ -131,7 +131,7 @@ pipeline {
|
||||||
steps{
|
steps{
|
||||||
script{
|
script{
|
||||||
env.EXT_RELEASE = sh(
|
env.EXT_RELEASE = sh(
|
||||||
script: ''' curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages |grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}' ''',
|
script: ''' curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages.gz | gunzip | grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}' ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
env.RELEASE_LINK = 'custom_command'
|
env.RELEASE_LINK = 'custom_command'
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# jenkins variables
|
# jenkins variables
|
||||||
project_name: unifi-network-application
|
project_name: unifi-network-application
|
||||||
external_type: na
|
external_type: na
|
||||||
custom_version_command: "curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages |grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}'"
|
custom_version_command: "curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages.gz | gunzip | grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}'"
|
||||||
release_type: stable
|
release_type: stable
|
||||||
release_tag: latest
|
release_tag: latest
|
||||||
ls_branch: main
|
ls_branch: main
|
||||||
|
|
Loading…
Reference in a new issue