-
Notifications
You must be signed in to change notification settings - Fork 2
JavaScript: have File.setContents() take only the contents as a parameter
#536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6fe1e66
README: added Repobeats stats.
agarny d6d0aba
Improved our `newversion[.bat]` script / batch file.
agarny a045cb6
New version.
agarny 0f06ff6
JavaScript playground: some minor cleaning up.
agarny 6c7a22d
JavaScript: have `File.setContents()` only take the contents, not its…
agarny 542590f
Updated our JavaScript playground.
agarny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 +1 @@ | ||
| 0.20260210.0 | ||
| 0.20260211.0 | ||
agarny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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,38 +1,35 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Major version. | ||
| # Current version from `VERSION.txt`. | ||
|
|
||
| major_version=0 | ||
| version_file=$(cd "$(dirname "$0")" && pwd)/VERSION.txt | ||
|
|
||
| # Minor version. | ||
| old_version=$(cat "$version_file") | ||
|
|
||
| old_major_version=$(echo $old_version | cut -d. -f1) | ||
| old_minor_version=$(echo $old_version | cut -d. -f2) | ||
| old_patch_version=$(echo $old_version | cut -d. -f3) | ||
|
|
||
| # Determine the new version based on the current version and the current date. | ||
|
|
||
| now=$(date +%Y%m%d) | ||
| minor_version=$now | ||
|
|
||
| # Patch version. | ||
|
|
||
| patch_version=0 | ||
|
|
||
| if latest_tag_commit=$(git rev-list --tags --max-count=1 2> /dev/null); then | ||
| if git_describe=$(git describe --tags "$latest_tag_commit" 2> /dev/null); then | ||
| if echo "$git_describe" | grep -Eo '^v?[0-9]+\.[0-9]+\.[0-9]+' > /dev/null; then | ||
| minor=$(echo "$git_describe" | cut -d. -f2) | ||
| patch=$(echo "$git_describe" | cut -d. -f3) | ||
| patch_version=$patch | ||
|
|
||
| if [ "$minor" = "$minor_version" ]; then | ||
| patch_version=$((patch_version + 1)) | ||
| else | ||
| patch_version=0 | ||
| fi | ||
| fi | ||
| fi | ||
| fi | ||
|
|
||
| # Full version. | ||
| new_major_version=$old_major_version | ||
| new_minor_version=$now | ||
|
|
||
| version="$major_version.$minor_version.$patch_version" | ||
| if [ $old_minor_version -lt $now ]; then | ||
| new_patch_version=0 | ||
| else | ||
| new_patch_version=$(($old_patch_version + 1)) | ||
| fi | ||
|
|
||
| new_version="$new_major_version.$new_minor_version.$new_patch_version" | ||
|
|
||
| # Update our version file. | ||
|
|
||
| echo $version > $(cd $(dirname $0); pwd)/VERSION.txt | ||
| echo "$new_version" > "$version_file" | ||
agarny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # Display the old and new versions. | ||
|
|
||
| printf '\033[1mOld version:\033[0m %s\n' "$old_version" | ||
| printf '\033[1mNew version:\033[0m %s\n' "$new_version" | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.