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
### Keybase proof | |
I hereby claim: | |
* I am janhenrik on github. | |
* I am sirjanhenrik (https://keybase.io/sirjanhenrik) on keybase. | |
* I have a public key ASAiO9kOuwbi1bop_hYVS3Esc3hPtbUEFWxuXcPRQ-713go | |
To claim this, I am signing this object: |
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
#!/bin/bash | |
HASH="6d1c3b49ec99b098212d357e0d8e6add" | |
URL="http://store.apple.com/no/browse/home/shop_iphone/family/iphone" | |
NEW_HASH=`curl -s $URL | md5 -q` | |
if [[ "${HASH}" == "${NEW_HASH}" ]]; then | |
echo "NOTICE: hasn't changed" | |
else | |
echo "ALERT: [$URL] CHANGED from [$HASH] to [$NEW_HASH]" | |
mail -s "ALERT: [$URL] CHANGED from [$HASH] to [$HASHVALUE] - buy the iPhone 5!!!" my@email.com </dev/null | |
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
git reset --hard origin/HEAD |
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
printf "Laster opp #{local_file} til #{rest_of_path}..." | |
begin | |
res = RestClient.put(url, File.new(local_file)) | |
unless res.code >= 200 and res.code < 300 | |
raise "Opplasting til Artifactory svarte ikke med HTTP OK, feilmelding var: #{res.message}" | |
end | |
puts "Opplasting vellykket! Status: #{res.code}" | |
rescue => e |
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
puts "Sjekker inn ny utviklingsversjon" | |
`git commit pom.xml */pom.xml -m "[release.rb] Ny utviklingsversjon av #{super_pom.artifactId}-#{snapshot_version}"` | |
puts "Pusher til sentralt git repository." | |
`git push --tags && git push origin #{current_branch}` |
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
def neste_release version | |
versionsnummer = version.split('.') | |
major = versionsnummer[0].to_i | |
minor = versionsnummer[1].to_i | |
return "#{major}.#{minor+1}.0-SNAPSHOT" | |
end |
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
unless system("git tag -f #{super_pom.artifactId}-#{release_version}") | |
raise("Could not create tag.") | |
end |
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
`git commit pom.xml */pom.xml -m "[release.rb] Release ny versjon av | |
#{super_pom.artifactId}-#{release_version}"` |
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
mvn_success = system("mvn -U clean package >> /tmp/mvn_build") | |
unless mvn_success | |
raise("Build failure") | |
end |
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
def neste_snapshot release_version | |
versionsnummer = release_version.split('.') | |
major = versionsnummer[0].to_i | |
minor = versionsnummer[1].to_i | |
patch = versionsnummer[2].to_i | |
if patch == 0 | |
return "#{major}.#{minor+1}.0" | |
else | |
return "#{major}.#{minor}.#{patch+1}" |
NewerOlder