aboutsummaryrefslogtreecommitdiffstats
path: root/travis.sh
blob: 34a94dd266326add404e160390841e863bdc3aeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#!/bin/bash
set -euo pipefail

./.travis/setup_ramdisk.sh

#
# A (too) old version of JDK8 is installed by default on Travis.
# This method is preferred over Travis apt oracle-java8-installer because
# JDK is kept in cache. It does not need to be downloaded from Oracle
# at each build.
#
function installJdk8 {
  echo "Setup JDK 1.8u131"
  mkdir -p ~/jvm
  pushd ~/jvm > /dev/null
  if [ ! -d "jdk1.8.0_131" ]; then
    wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
    tar xzf jdk-8u131-linux-x64.tar.gz
    rm jdk-8u131-linux-x64.tar.gz
  fi
  popd > /dev/null
  export JAVA_HOME=~/jvm/jdk1.8.0_131
  export PATH=$JAVA_HOME/bin:$PATH
}

#
# Maven 3.2.5 is installed by default on Travis. Maven 3.3.9 is preferred.
#
function installMaven {
  echo "Setup Maven"
  mkdir -p ~/maven
  pushd ~/maven > /dev/null
  if [ ! -d "apache-maven-3.3.9" ]; then
    echo "Download Maven 3.3.9"
    curl -sSL http://apache.mirrors.ovh.net/ftp.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | tar zx -C ~/maven
  fi
  popd > /dev/null
  export M2_HOME=~/maven/apache-maven-3.3.9
  export PATH=$M2_HOME/bin:$PATH
}

function installNode {
  set +u
  source ~/.nvm/nvm.sh && nvm install 8
  set -u
}

#
# Replaces the version defined in sources, usually x.y-SNAPSHOT,
# by a version identifying the build.
# The build version is composed of 4 fields, including the semantic version and
# the build number provided by Travis.
#
# Exported variables:
# - INITIAL_VERSION: version as defined in pom.xml
# - BUILD_VERSION: version including the build number
# - PROJECT_VERSION: target Maven version. The name of this variable is important because
#   it's used by QA when extracting version from Artifactory build info.
#
# Example of SNAPSHOT
# INITIAL_VERSION=6.3-SNAPSHOT
# BUILD_VERSION=6.3.0.12345
# PROJECT_VERSION=6.3.0.12345
#
# Example of RC
# INITIAL_VERSION=6.3-RC1
# BUILD_VERSION=6.3.0.12345
# PROJECT_VERSION=6.3-RC1
#
# Example of GA
# INITIAL_VERSION=6.3
# BUILD_VERSION=6.3.0.12345
# PROJECT_VERSION=6.3
#
function fixBuildVersion {
  export INITIAL_VERSION=`maven_expression "project.version"`

  # remove suffix -SNAPSHOT or -RC
  without_suffix=`echo $INITIAL_VERSION | sed "s/-.*//g"`

  IFS=$'.'
  fields_count=`echo $without_suffix | wc -w`
  unset IFS
  if [ $fields_count -lt 3 ]; then
    export BUILD_VERSION="$without_suffix.0.$TRAVIS_BUILD_NUMBER"
  else
    export BUILD_VERSION="$without_suffix.$TRAVIS_BUILD_NUMBER"
  fi

  if [[ "${INITIAL_VERSION}" == *"-SNAPSHOT" ]]; then
    # SNAPSHOT
    export PROJECT_VERSION=$BUILD_VERSION
    mvn org.codehaus.mojo:versions-maven-plugin:2.2:set -DnewVersion=$PROJECT_VERSION -DgenerateBackupPoms=false -B -e
  else
    # not a SNAPSHOT: milestone, RC or GA
    export PROJECT_VERSION=$INITIAL_VERSION
  fi

  echo "Build Version  : $BUILD_VERSION"
  echo "Project Version: $PROJECT_VERSION"
}

#
# Configure Maven settings and install some script utilities
#
function configureTravis {
  mkdir -p ~/.local
  curl -sSL https://github.com/SonarSource/travis-utils/tarball/v36 | tar zx --strip-components 1 -C ~/.local
  source ~/.local/bin/install
}
configureTravis

# When pull request exists on the branch, then the job related to the branch does not need
# to be executed and should be canceled. It does not book slaves for nothing.
# @TravisCI please provide the feature natively, like at AppVeyor or CircleCI ;-)
cancel_branch_build_with_pr

case "$TARGET" in

BUILD)

  installJdk8
  installMaven
  installNode
  fixBuildVersion

  # Minimal Maven settings
  export MAVEN_OPTS="-Xmx1G -Xms128m"
  MAVEN_ARGS="-T 1C -Dmaven.test.redirectTestOutputToFile=false -Dsurefire.useFile=false -B -e -V -DbuildVersion=$BUILD_VERSION -Dtests.es.logger.level=WARN"

  if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
    echo 'Build and analyze master'

    # Fetch all commit history so that SonarQube has exact blame information
    # for issue auto-assignment
    # This command can fail with "fatal: --unshallow on a complete repository does not make sense"
    # if there are not enough commits in the Git repository (even if Travis executed git clone --depth 50).
    # For this reason errors are ignored with "|| true"
    git fetch --unshallow || true

    mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
          $MAVEN_ARGS \
          -Pdeploy-sonarsource,release
        
    mvn sonar:sonar \
          -Dsonar.host.url=$SONAR_HOST_URL \
          -Dsonar.login=$SONAR_TOKEN \
          -Dsonar.projectVersion=$INITIAL_VERSION

  elif [[ "$TRAVIS_BRANCH" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
    echo 'Build release branch'

    mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
        $MAVEN_ARGS \
        -Pdeploy-sonarsource,release

    mvn sonar:sonar \
        -Dsonar.host.url=$SONAR_HOST_URL \
        -Dsonar.login=$SONAR_TOKEN \
        -Dsonar.branch.name=$TRAVIS_BRANCH

  elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then
    echo 'Build and analyze internal pull request'

    mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
        $MAVEN_ARGS \
        -Dsource.skip=true \
        -Pdeploy-sonarsource

    # analysis to decorate GitHub pull request
    # (need support of standard analysis mode in GH plugin)
    mvn sonar:sonar \
        -Dsonar.host.url=$SONAR_HOST_URL \
        -Dsonar.login=$SONAR_TOKEN \
        -Dsonar.analysis.mode=preview \
        -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \
        -Dsonar.github.repository=$TRAVIS_REPO_SLUG \
        -Dsonar.github.oauth=$GITHUB_TOKEN

    if [ "$TRAVIS_BRANCH" == "master" ]; then
      # analysis of short-living branch based on another short-living branch
      # is currently not supported
      mvn sonar:sonar \
          -Dsonar.host.url=$SONAR_HOST_URL \
          -Dsonar.login=$SONAR_TOKEN \
          -Dsonar.branch.name=$TRAVIS_PULL_REQUEST_BRANCH \
          -Dsonar.branch.target=$TRAVIS_BRANCH
    fi
  else
    echo 'Build feature branch or external pull request'

    mvn install $MAVEN_ARGS -Dsource.skip=true
  fi

  ./run-integration-tests.sh "Lite" ""
  ;;

WEB_TESTS)
  installNode
  curl -o- -L https://yarnpkg.com/install.sh | bash
  export PATH=$HOME/.yarn/bin:$PATH
  cd server/sonar-web && yarn && yarn validate
  ;;

*)
  echo "Unexpected TARGET value: $TARGET"
  exit 1
  ;;

esac
ue='backport/48921/stable30'>backport/48921/stable30 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/lib/l10n/vi.json
blob: 624139af46b1fe09a754e0d5eaf7e5eaaf1ac9af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{ "translations": {
    "Cannot write into \"config\" directory!" : "Không thể ghi vào thư mục \"config\"!",
    "See %s" : "Xem %s",
    "Unknown filetype" : "Không biết kiểu tập tin",
    "Invalid image" : "Hình ảnh không hợp lệ",
    "today" : "hôm nay",
    "yesterday" : "hôm qua",
    "last month" : "tháng trước",
    "_%n month ago_::_%n months ago_" : ["%n tháng trước"],
    "last year" : "năm trước",
    "_%n hour ago_::_%n hours ago_" : ["%n giờ trước"],
    "_%n minute ago_::_%n minutes ago_" : ["%n phút trước"],
    "seconds ago" : "vài giây trước",
    "__language_name__" : "Tiếng Việt",
    "Help" : "Giúp đỡ",
    "Apps" : "Ứng dụng",
    "Settings" : "Thiết lập",
    "Log out" : "Đăng xuất",
    "Users" : "Người dùng",
    "Unknown user" : "Người dùng không tồn tại",
    "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Hãy xóa thiết lập open_basedir tại tập tin cấu hình php.ini hoặc chuyển sang dùng PHP 64-bit.",
    "Open »%s«" : "Mở »%s«",
    "Could not find category \"%s\"" : "không thể tìm thấy mục \"%s\"",
    "Sunday" : "Chủ nhật",
    "Monday" : "Thứ 2",
    "Tuesday" : "Thứ 3",
    "Wednesday" : "Thứ 4",
    "Thursday" : "Thứ 5",
    "Friday" : "Thứ ",
    "Saturday" : "Thứ 7",
    "Sun." : "Chủ nhật",
    "Mon." : "Thứ hai",
    "Tue." : "Thứ ba",
    "Wed." : "Thứ tư",
    "Thu." : "Thứ năm",
    "Fri." : "Thứ sáu",
    "Sat." : "Thứ bảy",
    "January" : "Tháng 1",
    "February" : "Tháng 2",
    "March" : "Tháng 3",
    "April" : "Tháng 4",
    "May" : "Tháng 5",
    "June" : "Tháng 6",
    "July" : "Tháng 7",
    "August" : "Tháng 8",
    "September" : "Tháng 9",
    "October" : "Tháng 10",
    "November" : "Tháng 11",
    "December" : "Tháng 12",
    "Jan." : "Tháng 1",
    "Feb." : "Tháng 2",
    "Mar." : "Tháng 3",
    "Apr." : "Tháng 4",
    "May." : "Tháng 5",
    "Jun." : "Tháng 6",
    "Jul." : "Tháng 7",
    "Aug." : "Tháng 8",
    "Sep." : "Tháng 9",
    "Oct." : "Tháng 10",
    "Nov." : "Tháng 11",
    "Dec." : "Tháng 12",
    "User disabled" : "Vô hiệu hóa sử dụng",
    "a safe home for all your data" : "Một ngôi nhà an toàn cho toàn bộ dữ liệu của bạn",
    "Application is not enabled" : "Ứng dụng không được BẬT",
    "Authentication error" : "Lỗi xác thực",
    "Token expired. Please reload page." : "Mã Token đã hết hạn. Hãy tải lại trang.",
    "Storage is temporarily not available" : "Kho lưu trữ tạm thời không khả dụng",
    "Create" : "Tạo mới",
    "Change" : "Chỉnh sửa",
    "Delete" : "Xóa",
    "Share" : "Chia sẻ",
    "Sharing" : "Đang chia sẽ",
    "Security" : "Bảo mật",
    "Unlimited" : "Không giới hạn",
    "Verifying" : "Đang xác minh",
    "Verifying …" : "Đang xác minh ...",
    "Verify" : "Xác minh"
},"pluralForm" :"nplurals=1; plural=0;"
}