For example create a file with multiple servers:
echo 192.168.1.1 >> production_servers
Use the file with run_on to execute a command on all servers in parallel:
#!/usr/bin/env bash | |
if [[ "$TERM_PROGRAM" = "vscode" ]] | |
then | |
code --reuse-window --wait "$@" | |
else | |
code --new-window --wait "$@" | |
fi |
Create a file production
that includes the server hostnames of production servers.
Then call for instance:
./run_on.sh production 'tail -f /var/log/nginx/access.log'
#!/usr/bin/env bash | |
RUBOCOP_CONF="$1" | |
cat "$RUBOCOP_CONF" | \ | |
sed -e 's|^DuplicatedGem|Bundler/DuplicatedGem|g' | \ | |
sed -e 's|^InsecureProtocolSource|Bundler/InsecureProtocolSource|g' | \ | |
sed -e 's|^OrderedGems|Bundler/OrderedGems|g' | \ | |
sed -e 's|^DuplicatedAssignment|Gemspec/DuplicatedAssignment|g' | \ | |
sed -e 's|^OrderedDependencies|Gemspec/OrderedDependencies|g' | \ | |
sed -e 's|^RequiredRubyVersion|Gemspec/RequiredRubyVersion|g' | \ |
Make sure hub is installed and set up with your user credentials.
./update-gem.sh loofah "Resolves security vulnerability."
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.maven.test</groupId> | |
<artifactId>main</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<name>My Dependency Test</name> | |
<description/> |
This Gradle script will generate a changelog.json file from a recent_changes.txt
.
The recent_changes.txt
is a Markdown file where a developer can define the changelog and the Gradle task will convert it to JSON, so that it can be used inside a app or in later Gradle tasks.
The resulting JSON structure can be found in example.changelog.json
.
In addition, the changelog.json is reused for a whatsnew
file that can be uploaded to Google Play using Google Play Publisher.
buildscript { | |
dependencies { | |
classpath "com.amazonaws:aws-java-sdk:1.3.11" | |
} | |
} | |
def awsCredentials = new BasicAWSCredentials(awsAccessKey, awsSecretKey) | |
// Publish APK and mapping file over SCP | |
android.applicationVariants.all { variant -> |
ant.taskdef( | |
name: 'scp', | |
classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', | |
classpath: configurations.sshAntTask.asPath | |
) | |
// Publish APK and mapping file over SCP | |
android.applicationVariants.all { variant -> | |
if (variant.buildType.name != "release") { | |
return |
def exec(String cmdline) { | |
def os = new ByteArrayOutputStream() | |
exec { | |
commandLine cmdline.split(" ") | |
standardOutput = os; | |
} | |
return os.toString().replaceAll('\\s', '') | |
} | |
def getGitSha() { |